Showing posts with label Sublime Text 2. Show all posts
Showing posts with label Sublime Text 2. Show all posts

Saturday, March 1, 2014

Sublime Text key bindings to jump out of parans, quotes and brackets like in Eclipse

One of the best features of Eclipse is having the "Enter" key move you outside of the parentheses, ticks, or brackets of a method.  That shortcut is so ingrained in me after a decade of Eclipse usage that I doubt I will ever be able to forget it.

Sublime Text is a great editor, but it doesn't have that shortcut.  I added it to Preferencs -> Key Bindings -> User

{ "keys": ["enter"], "command": "move", "args": {"by": "characters", "forward": true}, "context": 
 [
  { "key": "following_text", "operator": "regex_match", "operand": "[\"')}](.|$)", "match_all": true  } 
 ]
}

Tuesday, May 7, 2013

Toggle sidebar in Sublime Text

The more I use Sublime Text the more I like it. 

One thing that is missing (at least in the Linux version) is a shortcut to toggle the side bar.  The Mac version used to use "ctrl+s", but that's what I associate with saving a file.  I added a shortcut for "ctrl+b"; "b" for "bar" :

{ "keys": ["ctrl+b"], "command": "toggle_side_bar" }

To add this choose Preferences -> Key Bindings User

Be sure to add a comma to the line above as well.