moyicat / inkdrop-code-fold

Code fold plugin for Inkdrop
MIT License
5 stars 6 forks source link

Added folding at current cursor position #3

Open jglanz opened 3 years ago

jglanz commented 3 years ago

Added the ability to toggle folding at the current cursor position, with a default key binding of alt-=.

It required a single method being added, 4 lines of code

  foldToggleCursor() {
    var { cm } = global.inkdrop.getActiveEditor()
    //editor.cm.execCommand('foldAll');
    cm.foldCode(cm.getCursor())
  }

Thx for putting together this plugin - quite helpful with my larger notes