Text Editor Command
Vi Command:
- vi filename
- :wq<Return> # write and quit
- :q!<Return> # quit without save
- :w<Return> # write current content
- i # insert text before cursor
- a # insert text after cursor
- x # delete 1 character
- u # undo
- yy # copy line
- p # paste line
- /string # search forward
- G # search next match
- :42 # goto line 42
- 3yy # copy 3 lines
- 7yw # copies 7 words
- { # move cursor to previous para
- } # move cursor to previous para
- H # move cursor to head of screen
- M # move cursor to middle of screen
- L # move cursor to last of screen
- . # Repeat last command
Vim Command:
Emacs Command:
- ctrl+g # quit command
- ctrl+x ctrl+f # open file
- ctrl+x ctrl+s # save
- ctrl+x ctrl+w # save as
- ctrl+x b # switch buffers
- ctrl+x ctrl+b # show buffer list
- ctrl+x k # kill buffer
- ctrl+x ctrl+c # close emacs
- ctrl+a # beginning of line
- ctrl+e # end of line
- alt+shift+< # beginning of text
- alt+shift+> #end of text
- ctrl+k # kill line
- ctrl+space # set beginning mark
- ctrl+w # delete/cut the marked region region
- alt+w # copy the marked region
- ctrl+y paste copied/killed region/line
- ctrl+x u # undo
- alt+/ # auto completion
- ctrl+s # search forward
- ctrl+s w # select word for search
- ctrl+r # search backward
- ctrl+x o # switch to other window
- ctrl+1 # close all window except current window
- ctrl+2 # split window horizontally
- ctrl+3 # split window vertically
- Alt+g g # go to line