Monday, July 7, 2014

TextMate Shortcuts

It is super handy to deal with some routine yet trivial tasks with a few TextMate tricks.
Here I list some shortcuts which I found most useful.

  • Column wise selection
    Option + Left Drag with mouse
    This allows selection and direct editing on vertical columns.

  • Auto completion of the code
    Esc
    In many IDEs, Tab is used for auto completion, similarly you can use Esc key to do this.

  • Find and Replace in Project Folder
    Command + Shift + F
    This allows quick replace in a bunch of files inside the same project folder.

  • Selection of whole line
    Control + Command + left Arrow or Right Arrow
    Shift + Command + L

  • Change Indent
    Command + [ or ]
    This is very useful for Python when there is a block of code need to be indented.

  • Comment current line
    Command + /
    If you do Command + / two times, it will uncomment the line. You can also first selected the code block and then comment all together.

  • clip board history viewer
    Control + Option + Command + v

  • Duplicate current line
    Control + Shift + d

  • Insert Comment Banner
    Control + Shift + b

  • Open Home directory in sidebar
    Shift + Command + h

  • Insert Burdle Item
    Control + Command + t

  • I did a google search during the writing and found a number of great posts and resources:
    Essential TextMate Shortcuts, Tips and Techniques
    TextMate shortcuts you should be using
    PDF version of the TextMate cheat Sheet.