Code Blog

Displaying 1-1 of 1 result.
2016/02/15 Programming,Sublime-Editor

It's difficult to remember too many shortcuts, especially as i'm not using Sublime Text everyday, so I try to keep the list short. It's useful to lookup shortcuts via the command palette when I've forgotten something. A note on the documentation: the "super" key is the cmd key on the mac.

A Few Useful Shortcuts

cmd D mark word / multiple cursor
cmd shift P command palette
cmd P goto anything (add @ to search for symbols)
cmd R find symbol
   
cmd alt n advanced new file (need to first install the extension)
shift cmd [ or ] move between open files / tabs

Example of combined search:

cmd P “view blog form @functionname ”

This will search a file with the filepath matching for example, "view/blog/form.php", and it will open the first file that matches the search criteria and then also search for the "functionname" symbol inside the file!

 

Mac finder menu

On the mac its also nice to have a command in the left click menu in finder, to easily let Sublime Text read in a folder or file (the file structure will appear in the side bar of Sublime)

Go to Automator and create new command

Shell command

Create a "bin" directory for local user and create "subl" symbolic link to Sublime Text.

ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl .

in .bash_profile in home directory add the following line:

export PATH="~/bin:$PATH"

Show Hidden files in file dialog

Press ⌘ cmd + ⇧ shift + . to toggle show/hide hidden files.