- Multi-selection: To enable multi-selection, you have several options
- Press
Alt
orCommand
and then click in each region where you require a cursor. - Select a block of line, and then press
Shit
+Command
+ L - Place the cursor over a particular word, and press Control/Command + D repeatedly to select additional occurences of that word.
- Alternatively, add an additional cursor at all occurences of a word by typing Alt+F3 on Windows, or Ctrl+Command+G on the Mac.
- Find all occurence of a word in a file and edit all of those at a time:
Command + F
thenOption + Enter
. All the occurance of the word should be editable.
- File Switching
Command + P
- Functions
Ctrl/Command + R
- Go to line Number
Ctrl + G
- Search word in bunch of files
Command + Shift + F To search for selected word (Command + E) (For Mac, works by default for Ubuntu)
- Enable file syntax highlighting before saving a new file
Command + Shift + p
And type the file type i.e for PHP typephp
. That will set the file type before saving the file.
- Soft undo:
Command + u
Undoes selection command as well as modifying commands, as oppossed to regular undo, which undoes modifying commands only.
- Start of the line
Command + Left
ORAlt + Left Arrow
- End of the line
Command + Right Arrow
ORAlt + Right Arrow
- Start of the file
Command + Up Arrow
- End of the file
Command + Down Arrow
- Duplicates the current line
Command+Shit+D
- Delete the line
Control+Shift+K
- Move line of code up/down
Control + Command up/down arrow
- Alphabetical order sorting ??
- Flexibility of the go to anything dialogue
Command + t
orCommand + p
- Goto file: 'contr AdC' -> app/controllers/AdController.php
- Goto line in file: 'contr AdC:15' -> app/controllers/AdController.php line no.15
- Goto function in file: 'contr AdC@email' -> app/controllers/AdController.php
function email
- And it will work with or without the space for all the options i.e 'contrAd@email`
- ctrl + t swaps text, for example foo(bar) if you place the cursor before the parenthesis and press ctrl + t it will become bar(foo).