Emacs Shift-Mark

Did you ever miss the convenient feature of MS or other Windows products to highlight ("mark") text by moving the cursor with a pushed-down Shift key ? For those Emacs lovers among you, here's the solution. Note: this feature is now standard in Xemacs, just turn on (pc-selection-mode) in your init.el (or custom.el)
  • Include this line in your ~/.emacs file:
    (load "shift_mark")
  • copy the lisp file shift_mark.el or its compiled version shift_mark.elc (faster at emacs startup) in your local ~/emacs/ directory. (Don't ask me where to put those files on a Windows machine !!)

Shift-mark key bindings

Shift + Cursor Left/Right mark individual characters
Shift + Cursor Up/Down mark a whole line
Shift + Ctrl + Cursor Left/Right mark a word to the left/right
Shift + Ctrl + Cursor Up/Down mark to the beginning/end of the paragraph
Backspace delete the marked region
Any Regular Key overwrites the marked region

If some region is marked already and you press any of the above key combinations, the region is expanded or reduced by the respective size.

Last modified: Tue Nov 30 20:26:38 Pacific Standard Time 2004