Skip to content
This repository

Minor modes I use.

branch: master
README.markdown

Spiffy Textmate Mode

There are a bunch of Textmate minor modes available to Emacs users. This is one of them. If you don't like this one, try defunkt's textmate.el.

Installation

To use it, put spiffy-textmate-mode.el somewhere that Emacs can find it and add

(require 'spiffy-textmate-mode)
(spiffy-textmate-mode t)

to your ~/.emacs file.

Also, you'll want to make sure that your command key is bound to the 'meta' modifier and your option key to the 'super' modifier.

You can accomplish this in Carbon Emacs thusly:

(setq mac-pass-command-to-system nil)
(setq mac-option-modifier 'super)

Keybindings

  • shift-up: move up a line and select
  • shift-down: move down a line and select
  • shift-left: move left one character and select
  • shift-right: move right one character and select
  • control-shift-left: move left one word and select
  • control-shift-right: move right one word and select
  • meta-up: move to the beginning of the buffer
  • meta-down: move to the end of the buffer
  • meta-left: move to the beginning of the line
  • meta-right: move to the end of the line
  • meta-shift-up: move to the beginning of the buffer and select
  • meta-shift-down: move to the end of the buffer and select
  • meta-shift-left: move to the beginning of the line and select
  • meta-shift-right: move to the end of the line and select
  • control-meta-up: scoot the region or current line up one line
  • control-meta-down: scoot the region or current line down one line
  • control-meta-left: scoot the region left one character
  • control-meta-right: scoot the region right one character
  • super-up: move up a paragraph
  • super-down: move down a a paragraph
  • super-left: move left a word, considering underscore as a word constituent
  • super-right: move right a word, considering underscore as a word constituent
  • super-shift-up: move up a paragraph and select
  • super-shift-down: move down a a paragraph and select
  • super-shift-left: move left a word, considering underscore as a word constituent and select
  • super-shift-right: move right a word, considering underscore as a word constituent and select
  • Textmate-style parens: typing a left delimiter (that is, "(", "[", or "{") also inserts the right delimiter and leaves the point between them. Typing the right delimiter moves over the ), ], or } instead of inserting a new one. If the cursor is between an empty pair of balanced delimiters, typing backspace will eliminate both of them.
  • control-D: duplicate current line
  • meta-F: grep in project, where the project root is the directory with the .git directory in it
  • control-K: kill the current line
  • meta-l: Go to line (overrides downcase-word)
  • meta-L: highlight the current line or move the region's boundaries outward to line boundaries.
  • meta-t: choose a file in the project, where the project root is the directory with the .git directory in it. (overrides transpose-words)
  • control-x 4 meta-t: choose a file in the project and open it in another window (Emacs window, not GUI window)
  • control-x 5 meta-t: choose a file in the project and open it in another frame (GUI window)
  • control-w: selects the current word if no text is selected (Textmate behavior). If text is selected, control-w kills it (Emacs behavior). (overrides and enhances kill-region)
  • control-y: yank and indent text. (overrides and enhances yank)
  • meta-y: yank-pop and indent result. (overrides and enhances yank-pop)
  • meta-/: comment/uncomment the current line/region. (overrides dabbrev-expand)
  • meta-[: outdent the region or current line
  • meta-]: indent the region or current line
  • meta-s-[: fix indentation in region
  • meta-s-]: align the region
  • meta-delete: kill to end of line
  • meta-return: skip to the end of the line and insert a newline.
  • meta-s-return: open and indent a new line above the current one.
  • backspace: delete selected text or character before point. In the middle of (), [], or {}, it deletes the pair. (overrides and enhances delete-backward-char)
  • meta-backspace: kill to beginning of line (overrides backward-kill-word)
Something went wrong with that request. Please try again.