Emacs Notes

This is a post for myself to constantly update the useful emacs commands


  1. Ctrl-X Ctrl-F , switching to different file without closing the window
  2. Ctrl-G to kill what ever command unfinished in the buffer
  3. Ctrl-X Compile allows you to compile code within Emacs. But it assumes the current directory is the source directory. If your make file is somewhere, do cd path/to/makefile && make
  4. Esc + L (turns the word all lower case)
  5. Esc + C (first letter capital, rest lower case)
  6. Spell Check
    1. Esc +X + ispell-buffer (need to install this)
  7. Enter shell commands in latex (good for compiling the code shown)
    1. Esc + shift + ! , and then enter the command and return to execute the command,
      1. More commands can be found hereĀ http://www.nongnu.org/emacsdoc-fr/manuel/shell.html
    2. a separate buffer of output will be shown, to close it, refert to the command below
    3. last used command, enter Ctrl-p after Esc + shift + !
  8. Switching, closing other buffers in Emacs
    1. Ctrl-x 1 (close all other windows)
    2. Ctrl-x 0 (close current window)
    3. More info https://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Window.html
  9. Doing grep from within the buffer
    1. M-X grep
    2. To swith to the output buffer, Ctrl-X o
    3. https://www.gnu.org/software/emacs/manual/html_node/emacs/Grep-Searching.html
  10. Splitting Windows
    1. https://www.gnu.org/software/emacs/manual/html_node/emacs/Split-Window.html
    2. Ctrl-x 2 (split vertically)
    3. Ctrl-x 3 (split horizontally)
    4. Ctrl-x 0 (switch between splits)







This entry was posted in Tools and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s