At line 3 changed one line |
The emacs editor is perhaps the most powerful editor available. It runs under Unix, Linux, Macintosh, and Windows. It is highly customizable, and is even programmable. Emacs comes with hundreds of modes and thousands of commands. The following list represents a tiny set of commands to help get you started. |
The emacs editor is perhaps the most powerful editor available. It runs under Unix, Linux, Macintosh, and Windows. It is highly customizable and programmable. Emacs comes with hundreds of modes and thousands of commands. The following list represents a tiny set of commands to help get you started. |
At line 5 changed one line |
In what follows, "^x" would mean pressing the "x" key while the control key is held. "^x^f" would mean press "xf" while holding the control key down. "^xs" means press the "x" key while the control key is held, and then hit the "s" key after releasing the control key. The control key acts like the shift key. |
In what follows, "^x" would mean pressing the "x" key while the control key is held. "^x^f" would mean press "xf" while holding the control key down. "^xs" means press the "x" key while the control key is held, and then hit the "s" key after releasing the control key. The control key acts like the shift key in that it modifies the affect of the other key pressed. |
At line 27 changed one line |
|^x ^s|save a the buffer currently being edited to the original file |
|^x ^s|save the buffer currently being edited to the original file |
At line 29 changed one line |
|^x I|insert a file at the current location |
|^x i|insert a file at the current location (^x-eye) |
At line 32 changed one line |
!!Motion |
!!Cursor Motion |
At line 36 added 4 lines |
|^f | forward a character |
|^b | back a character |
|^n | next line |
|^p | previous line |
At line 49 added 8 lines |
!! Scrolling (screen motion) |
|
|^v or PgDn|Scroll down |
|Esc-v or PgUp|Scroll up |
|Esc 0^l|Current line to top of screen (Esc zero Ctl-ell) |
|Esc ^l|Current line to middle of screen (Esc Ctl-ell) |
|
|
At line 73 added 4 lines |
Consecutive undo's via consecutive ^/ |
|
To redo, type anything except a ^/ The following ^/ will redo. |
|
At line 143 changed one line |
| ^x^kbX | bind the last keyboard macro to the sequence ^x^kX (where X is any number or letter) |
| ^x^kbX | bind the last keyboard macro to the sequence ^x^kX (where X is any number or upper-case letter) |
At line 161 added 8 lines |
!!Repeating |
|
All emacs command may be executed any number of times by preceding the command as follows: |
|
| Esc N cmd | repeat command cmd N times |
|
This is especially useful with keyboard macros in order to repeat a sequence many times. |
|
At line 155 removed one line |
!!Repeating |
At line 157 removed 5 lines |
All emacs command may be executed any number of times by preceding the command as follows: |
|
| Esc N cmd | repeat command cmd N times |
|
|
At line 166 changed one line |
| ^h i | access the embedded emacs manual |
| ^h i | info - access the embedded emacs manual |
At line 186 added 2 lines |
| ^h b | describe bindings - explain all current keyboard bindings |
| ^h m | describe mode - explain all facilities for the current file type mode |
At line 199 added 21 lines |
|
!! Tags |
|
Emacs comes with a program named “etags” that is used to create tag files. |
|
Tag files are named “TAGS” |
|
You can run etags in several directories producing one big tag file representing the whole project. |
|
|
Usage: {{{etags [-o OUTFILE] [-a] *.c *.h}}} |
|
|
| Esc-x visit-tags-table | read a TAGS file |
| Esc-. | find tag |
| ^u-Esc-. | find next tag |
| Esc-* | go back to where tag was searched |
| Esc-Tab | symbol completion |
|
| ^x-^space | go back to previous location |
|