Move cursor out of parenthesis, quotes, or brackets


#1

There is a key binding that I used in Sublime Text 2 that allows me to move the cursor out of parenthesis, quotes, or brackets. This was answered in stackoverflow for sublime text 2 -

This was the solution I implemented in ST2 from the above as a keybinding - user, and overrides the “enter” command

{ “keys”: [“enter”], “command”: “move”, “args”: {“by”: “characters”, “forward”: true}, “context”:
[
{ “key”: “following_text”, “operator”: “regex_contains”, “operand”: “^[)”\]]", “match_all”: true },
{ “key”: “auto_complete_visible”, “operator”: “equal”, “operand”: false }
]
}

When my cursor is at the " or ), I hit enter and the cursor jumps or moves past the ) and allows me to enter a ;

This is very helpful in javascript coding.

I am not sure how to do this in atom. Any suggestions please?


#2

+1. I use the tab in eclipse to do the same thing and it is really useful


#3

Check out this code snippet, it does exactly that http://learnsofteng.com/code-snippets/customizing-atom-jump-out-brackets-parentheses


#4

Thanks a lot. That works exactly. The only change I made was instead of Ctrl+K, I changed it to “enter”. In the keymap.cson file, I changed it to the following -

'atom-text-editor:not([mini])':
  'enter': 'custom:jump-over-symbol'

When you press enter, "it jumps over the " and ).