Textmate

My notes from Textmate, Power Editing for the Mac

head <tab> – created commented header
<shift> <control> b – creates comment block
<command> t – search files
<shift> <command> t – search functions
<option> <command> 1/2/3 – fold sections
<command> l – go to line number
<F1> – Fold current
<F2> – Jump between bookmarks

Movement
<command> arrow right – end of line
<command> arrow left – beginning of line
<command> arrow down – eof
<command> arrow up – beginning of file

Selection
<shift> <command> l – select line
<control> <option> b – select block scope
<option> – for column selection
<shift><option> arrow – select text

Use <esc> for completion

Move Text
<control><command> up/down/right/left – move text by line/char
<option><tab> – indent
<option><shift><tab> – un-indent
<option><command>[ – proper indention
<shift><command> v – last in clipboard
<control><option><command> v – show clipboard

<control> < – start tag or create tag
<control><shift> < – create tag pair
<control><shift> . – close tag
<command> enter – jump out of tag
<tab> – jump out of tag
<control><shift><command> w – add missing tags to selection
<control><option><command> p – preview web
<option><command> a – edit multiple lines

Case
<control> U – uppercase word / selection
<shift><control> U – lowercase word / selection
<control><option> U – titlecase word / selection
<control><option> G – Reverse case word / selection

Format
<control> q – reformat current paragraph
<control> j – justify current paragraph
<control><option> q – unwrap and remove new lines (vim J)

Spelling
<option> F2 – gives list of word options

Emacs
<control> d – delete char to right
<control> t – transpose
<control> y – yanks text back from kill buffer
<control> o – new line w/out moving cursor

Blogging
Setup –
blog    ttp://username@www.example.com/xmlrpc.php#blog
<control><command> p – post to blog

Search & Replace
<control> s – search
<command> f – search & replace dialog
<option><command> r – toggle re
<option><command> i – toggle case sensitivity
<option><command> w – toggle word wrap
<control><command> f – replace all (didn’t work for me)
<shift><control><command> f – replace all in selection
summation button shows match count
<command> e – find from selection
<option><command> f – replace
<command> g – find next occurrence
<shift><command> f – find in project

Bundles
<control><command> t – search bundle commands

TODO
<control><shift> t – show todo list

Ruby
<command> r – run
<shift> <cmd> d – open required file
<control> <shift> v – validate ruby
<control> <shift> e – execute ruby

Rails
Add footnotes plugin, gives links to pages that will open in textmate
<control><shift> down arrow – switch between controller and spec
<control><shift> > – Create erb tags, type more than once to cycle through type
<option><command><shift> down arrow – cycle through related rails files
<control> p – create params[:id]
<control> j – create session[:id]

CTags
<option><command> P – create tags
<control> ] – Jump to definintion

Subversion
<control><shift> a – subversion

Math
<control><shift> c – math menu

Text
<control><shift> n – text menu
lorem – generate placeholder text

Source
<command> / – comment selection
<command> enter – move to end of line
<shift><command> enter – end of line with semi-colon
<control> ” – switch single / double quotes (not working for me)

Textmate
<control><option><shift> v – paste selection online
Create HTML from document with line numbers – as says