Some commands I often use in Emacs

 
Before the end of June, 2005. I was completely know nothing about `Emacs'. Thanks to Daniel told me such an excellent Editor and taught me lots of skills of using this great tool. It can perfectly help me do something that I cannot image before. So I will record some useful commands' keyboard shortcuts for myself to refer. Notice that, all the keyboard shortcuts' real command names could be found through C-h-k + 'your keyboard shortcut'.
Each Emacs comman is invoked by M-x. The following is just shortcuts of these command.
Basis
C-x C-c	       End the Emacs session.
C-x C-f	       Open a file.
C-x C-s	       Save the file.
C-g     Cancel the unfinished command.
M-~    Open the top menu.

Cursor moving
M-f	Move forward a word
M-b	Move backward a word

C-a	Move to beginning of line
C-e	Move to end of line

M-a	Move back to beginning of sentence
M-e	Move forward to end of sentence

M-<	Go to beginning of file
M->	Go to end of file

Edit
M-w	Copy
C-y	Paste
C-w	Cut
C-d	Delete the next character after the cursor
M-d	Kill the next word after the cursor
C-k	Kill from the cursor position to end of line
M-k	Kill to the end of the current sentence

Select
C-[space]    Set mark
First use command `set-mark' to mark the start point then move the cursor
wherever you want.

Searching
C-s     Start a search (You can type C-s to find the next occurrence)
C-r      Search back.
M-%    Replace.
Buffer
C-x C-b        List all the buffers.
C-x-b           Change to next buffer.

Others
C-M-n  (Ctrl+Alt+n) Move forward across one balanced group of parentheses.
C-x C+l        Change the selected region to lowercase
C-x C+u       Contrarily, upcase the region. 
M-.               Find tag (in current tags table) whose name contains TAGNAME. 
M-*              Pop the tag mark. (Jump back)
C-x v v        Perform the "cvs comit" command if the edit file has a CVS info associated with it.
C-c C-c       Save your log of "cvs comit" command.

Related Entries

Post a Comment