Created
January 9, 2016 23:20
-
-
Save aminroosta/368bb4e3f3987b2dcad1 to your computer and use it in GitHub Desktop.
atom init.coffee file to add toggle fold support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom.commands.add 'atom-text-editor', | |
'editor:toggle-folding': (event) -> | |
editor = @getModel() | |
bufferRow = editor.bufferPositionForScreenPosition(editor.getCursorScreenPosition()).row | |
if editor.isFoldedAtBufferRow(bufferRow) | |
editor.unfoldBufferRow(bufferRow) | |
else | |
editor.foldBufferRow(bufferRow) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment