Emacs introduction
时间:2004-11-10 来源:Lanma
IntroductionEmacs is a powerful text editor. Especially suited for programming, it uses intensively the keyboard shortcuts. This page is a short summary of the most used shortcuts in Emacs. If you are configuring your Linux, you will appreciate that Emacs also works in text mode.File accessCtrl-x Ctrl-f Open file Ctrl-x Ctrl-s SaveBuffer controlCtrl-x k Kill buffer (close file) Ctrl-x b Switch to an other buffer Ctrl-x 2 Split the window vertically to see an extra buffer Ctrl-x 3 Split the window horizontally to see an extra buffer Ctrl-x 0 Hide the current window Ctrl-x 1 Show only the current window Ctrl-x o Jump to an other windowText editingCtrl-Space Marks beginning of a block Alt-w Marks end of block and copy Ctrl-w Marks end of block and cut Ctrl-y Paste Ctrl-a Go to the beginning of the line Ctrl-e Go to the end of the line Ctrl-k Kill end of line (after the cursor)GeneralCtrl-g Cancel the command you are typing Ctrl-x Ctrl-c Quit emacs Ctrl-_ Undo TAB Automatic indentation (source code) while editing TAB Automatic completion while selecting a file or while typing a command in the mini-buffer Alt-x Type a command in the mini-buffer Alt-x c-mode Change major mode to c-mode Alt-x global-font-lock-mode Switch the 'global font lock mode' (highlights syntax)Search and replaceCtrl-s Incremental forward search (press Ctrl-s again to search further) Ctrl-r Incremental backward search (press Ctrl-r again to search further) Alt-% Search and replaceMultiple files searchSimple searchAlt-x grep Perform a 'grep' search Alt-x grep-find Perform a search using 'find' and 'grep'Tags (for programmers)find . -name "*.[ch]" | etags - Make a TAGS index file for every file whose name ends with '.c' or '.h', starting from the current directory (this is a shell command !) Alt-x visit-tags-table Load a TAGS file Alt-. Find a tagCtrl-u Alt-.continue find tagtags-search Search through all files listed in the tags table tags-query-replace Search and replace through all files listed in the tags table Alt-, continue last tag search Files comparisonAlt-x ediff Compares two filesSpell checkAlt-x ispell-buffer Spell check for the current bufferHelpCtrl-h ? General help functions Ctrl-h f Describe the command you type Ctrl-h a apropos ... help based on a keyword Ctrl-h m Help on the current major mode |
相关阅读 更多 +