In PatentStorm, I used Ctrl+W — Ctrl+Shift+W to fold / unfold code.
I migrated to Atom — is this possible to mimic?
In PatentStorm, I used Ctrl+W — Ctrl+Shift+W to fold / unfold code.
I migrated to Atom — is this possible to mimic?
Add this to your keymaps:
'atom-text-editor':
'ctrl-w': 'editor:fold-current-row'
'ctrl-shift-w': 'editor:unfold-current-row'
You can fold blocks of code by clicking the arrows that appear when you hover your mouse cursor over the gutter. You can also fold and unfold from the keyboard with the Alt+Ctrl+[ and Alt+Ctrl+] keybindings.
If you'd like to use a key binding to fold-toggle, create a custom command:
atom.commands.add 'atom-text-editor', 'editor:toggle-current-row-folding': (event) -> editor = @getModel() bufferRow = editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition()).row if editor.isFoldedAtBufferRow(bufferRow) editor.unfoldBufferRow(bufferRow) else editor.foldBufferRow(bufferRow)
Here you would use 'editor:toggle-current-row-folding'
as your command.
From abe + kschaper @ How to toggle current fold in editor view?