views:

2081

answers:

10

Macs are renowned (or bemoaned) for having an extensive number of shortcuts. However, OS X itself pales in comparison to the shortcut lists in TextMate and its bundles.

What are some useful keyboard shortcuts you use?

+1  A: 

in the cftextmate bundle you can type any cfml tag without the opening "<" or closing ">" and press tab and it completes the entire tag and you can then tab to each of the tag attributes. i'm not sure if this type of shortcut works for other languages.

ethyreal
+1  A: 

I just found a list of shortcut key symbols w/ definitions under Bundles > HTML > Entities - helpful for me in figuring out the whole short-cut bonanza going on with TextMate.

micahwittman
+16  A: 

These are my favorite shortcuts:

cmd+t: Start typing name of a file to open it
ctrl+w: Select word
cmd+r: Run the ruby or php-script that is open
cmd+opt+m: Define a new macro
cmd+shift+m: Run the macro
hit the opt key: Switch to vertical selection mode
cmd+opt+a: Edit ends of selected lines
Magnar
omg! cmd+opt-a is UBER-USEFUL! Why did't I know it? Thanks a million!
Agos
+4  A: 

Personally two of my favourite shortcuts are:

  • ⌃⇧L (that's ctrl+shift+L): Which wraps the currently selected text with a link to whatever's in the clipboard, and works for every text language I've tried it in.
  • ⌃⇧⌘L (that's ctrl+shift+cmd+L): Which googles for the selected text and links to the top result.

The are both super useful for writing text and blogging, (and stackoverflow).

Codewise, I think that I prefer snippets to key shortcuts. Being able to type if⇥ etc., in almost any language is ridiculously useful, and the consistent interface is what keeps me using TextMate.

I also found this quite amusing. But I prefer to learn my shortcuts in small steps, and often find that just looking in the gear menu (⌃⎋) works.

Matt
+6  A: 
  • ctrl+shift+K deletes current line
  • ctrl+shift+J merges current line with the next line
melfar
+2  A: 

Take a look at some of these cheatsheets for some good shortcuts:

Bill Turner
+1  A: 

You can get a really great desktop background here. It has a ton of really useful keyboard shortcuts. I used it for a couple of days before memorizing the most useful ones.

Nate Smith
+1  A: 

My favourites are:

  • option+command+[ to clean up your indentation
  • "lorem", TAB to insert placeholder text
alamodey
+1  A: 

shift+ctrl+alt+v sends selected text to pastie.org

also, using the PHP Bundle, try to start writing a function name and do the following:

str + alt + F3 = list of available functions

str + alt + F1 = short description of the function you've just completed.

svnlto
A: 

(these are mostly html-related)
cmd + option + . -> closes current open html tag
shift + cmd + w -> wrap selection in tags ctrl + return -> insert escaped line end, i.e. “\n” or “
” depending on the occasion.

Agos