Emacs editor mode
SourceLair provides you with an Emacs-like mode for its editor, that lets you use your favorite emacs commands and keyboard shortcuts in order to skyrocket your productivity. Emacs keymap is only a loose approximation of actual emacs bindings.
Some emacs keybindings might not work on some OS/browsers due to bindings like Ctrl-W, Ctrl-T and Ctrl-N being handled directly by the browser.
Enable Emacs mode
To enable the Emacs mode for the editor of SourceLair:
- open your Editor Settings
- scroll down at the Keymaps settings
- click on Emacs
This should turn on the Emacs mode for the editor. To turn the Emacs mode off, just go again to the Keymaps setting and click on Default.
Available commands
The Emacs style available commands are:
- Ctrl-K Kill to end of line
- Ctrl-Space Mark one end of region
- Ctrl-Shift-2 Mark one end of region
- Ctrl-W Cut - after you Mark and move to other end
- Alt-W Copy - after you Mark and move to other end
- Ctrl-Y Yank (paste) most recently killed (cut or copied)
- Alt-Y Yank (paste) next most recently killed. Repeat to cycle
- Ctrl-F Move character right
- Ctrl-B Move character left
- Ctrl-D Delete character from the right
- Delete Delete selection or character from the right
- Ctrl-H Delete character from the left
- Backspace Delete selection or character from the left
- Alt-F Move word forward
- Alt-B Move word backward
- Alt-D Kill word to the right
- Alt-Backspace Kill word to the left
- Ctrl-N Move line forward
- Ctrl-P Move line backward
- Ctrl-A Move to line start
- Ctrl-E Move to line end
- End Move to line start
- Home Move to line end
- Alt-V Move page up
- Ctrl-V Move page down
- PageUp Move page up
- PageDown Move page down
- Ctrl-Up Move paragraph up
- Ctrl-Down Move paragraph down
- Alt-A Move sentence backward
- Alt-E Move sentence forward
- Alt-K Kill sentence to end
- Ctrl-Alt-Backspace Kill sentence to start
- Ctrl-Alt-F Move expression forward
- Ctrl-Alt-B Move expression backward
- Shift-Ctrl-Alt-2 Mark to end of expression
- Ctrl-Alt-T Transpose current with next expression
- Ctrl-Alt-U Move to beggining of enclosing expression
- Alt-Space Add single space or replace multiple whitespace with one space
- Ctrl-O Replace selection with newline
- Ctrl-T Transpose characters
- Alt-C Capitalize current letter of word and lowercase the following letters
- Alt-U Uppercase all following letters of word
- Alt-L Lowercase all following letters of word
- Alt-; Toggle line comment
- Ctrl-/ Undo
- Shift-Ctrl-- Undo
- Ctrl-Z Undo
- Cmd-Z Undo
- Shift-Alt-, Goto document start
- Shift-Alt-. Goto document end
- Ctrl-S Find next (while having an active search)
- Ctrl-R Find previous (while having an active search)
- Ctrl-G Quit search
- Shift-Alt-5 Open search and replace prompt
- Alt-/ Autocomplete
- Ctrl-J New line and indent
- Enter Enter new line
- Tab Auto indent
- Alt-G G Goto line
- Ctrl-X Tab Indent selection
- Ctrl-X Ctrl-X Set selection
- Ctrl-X Ctrl-S Save file
- Ctrl-X Ctrl-W Save file
- Ctrl-X S Save all files
- Ctrl-X F Open file
- Ctrl-X U Undo
- Ctrl-X K Close file
- Ctrl-X Delete Delete sentence
- Ctrl-X H Select all
- Ctrl-Q Tab Insert tab