Created
March 11, 2016 16:47
-
-
Save theo-l/837d9bf13425921a72c8 to your computer and use it in GitHub Desktop.
the initiate script file for atom
This file contains hidden or 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
| SymbolRegex = /[)}>\]'";]/ | |
| atom.commands.add 'atom-text-editor', 'custom:jump-over-symbol': (event) -> | |
| editor = atom.workspace.getActiveTextEditor() | |
| cursorMoved = false | |
| for cursor in editor.getCursors() | |
| range = cursor.getCurrentWordBufferRange(wordRegex: SymbolRegex) | |
| unless range.isEmpty() | |
| cursor.setBufferPosition(range.end) | |
| cursorMoved = true | |
| event.abortKeyBinding() unless cursorMoved |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
used to jump some special chars