Skip to content

Instantly share code, notes, and snippets.

@theo-l
Created March 11, 2016 16:47
Show Gist options
  • Save theo-l/837d9bf13425921a72c8 to your computer and use it in GitHub Desktop.
Save theo-l/837d9bf13425921a72c8 to your computer and use it in GitHub Desktop.
the initiate script file for atom
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
@theo-l
Copy link
Author

theo-l commented Mar 11, 2016

used to jump some special chars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment