Tip: TextMate selection shortcuts
Posted by anthony crumley, Thu Nov 01 07:18:00 UTC 2007
TextMate provides a few useful selection shortcuts. Ctrl-w selects the current word. Shift-apple-L selects the current line. Shift-apple-B selects everything enclosed within brackets including the brackets. Brackets in Ruby and ERB include square brackets, curly brackets, and parenthesis. In HTML the entire tag including <> is selected. If brackets are nested pressing shift-apple-B multiple times will expand the selection outward. Control-option-B selects the current scope. This shortcut is useful but acts weird sometimes. In Ruby it is useful for selecting string literals with the quotes, instance variables with the ampersand, and class variables with both ampersands. In ERB it is useful for selecting entire ERB blocks, i.e. <...>.