Differences
This shows you the differences between two versions of the page.
— |
help:general_linux:emacs_tips [2015/08/27 10:16] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Emacs Tips ====== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Emacs Command Shorthand ===== | ||
+ | |||
+ | From the emacs built in tutorial((the tutorial is available in emacs with C-h t)) | ||
+ | < | ||
+ | Emacs commands generally involve the CONTROL key (sometimes labeled | ||
+ | CTRL or CTL) or the META key (sometimes labeled EDIT or ALT). Rather than | ||
+ | write that in full each time, we'll use the following abbreviations: | ||
+ | |||
+ | | ||
+ | Thus, C-f would be: hold the CONTROL key and type f. | ||
+ | | ||
+ | If there is no META, EDIT or ALT key, instead press and release the | ||
+ | ESC key and then type < | ||
+ | </ | ||
+ | |||
+ | On our system the META key is generally on both the ``Esc`` and the Left ``Alt``. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Colors! ===== | ||
+ | To enable syntax highlighting in emacs an a per session basis, in emacs enter: | ||
+ | |||
+ | M-x global-font-lock-mode | ||
+ | |||
+ | To make it always so, add the line: | ||
+ | (global-font-lock-mode 1) | ||
+ | To your ~/.emacs file. If you don't have a file in your home directory named '' | ||
+ | |||
+ | |||
+ | ===== Suspending ===== | ||
+ | At some point it became apparent that students were under the impression that C-z was how to exit emacs. They were using this shortcut and logging out which exposed a bug in Emacs that would take all available memory and crash that system. C-z has since been mapped to display a message telling you the proper way to exit emacs (C-x C-c). | ||
+ | |||
+ | If however you do actually use the suspend feature of emacs and want it back, add the following to your '' | ||
+ | < | ||
+ | |||
+ | Pressing C-z will suspend emacs giving you a job_spec of the stopped job. You can bring emacs back with the fg command followed by that job_spec. | ||
+ | |||
+ | [[http:// |