Monday, May 19, 2014

EMACS - Commands Compliation

This list is for my own easy reference for EMACS commands

Open EMACS as a standalone process

emacs "filename" &

Editing Commands

C-a   # Go to beginning of line
C-k   # Delete line from current point

Buffers Commands

C-x b   # Switch between buffers
C-x C-s   # Save current buffer
C-x C-c    # Close all buffer
C-x k       #Close a buffer

File Commands

C-c C-f   #Open a file or use find file

Windows Commands

C-x 4 b "buffer name"   # Open buffer in another window

C-x 4 f "filename"    # Open file in another window

C-x 0    # Close the currently selected window.

C-x 1    # Close all windows except the selected one.

C-x 2    #Split buffer below

C-x 3   #Split buffer

C-x o    # Select another window. Switch buffer

Shell Commands

M-! "command"    # Execute shell command

M-x shell       # launch a interactive subshell

C-u M-x shell      #launch a new interactive subshell with buffer name

C-Up or C-Down  #Arrow up and down to see command history
Esc-X Command

Ultimately, if you cannot remember all the short-cut, you can use Esc-X "command name" to run the command

For example, to use goto-line command, you can try "Esc-X goto-line".

No comments:

Post a Comment

PuTTY - Keeping session alive

If you have some VPN tunnels that timeout based on activity, you could try the following setting if you are using PuTTY 1) Open PuTTY and...