by icey · 17y ago · 0 comments
esc (escape) = go to the default mode
i (insert) = when you want to make changes to the document
esc + : (escape, colon) = think of this as control + whatever
:w = (w)rite - save your file
:q = (q)uit - quit vim
:wq = (w)rite, then (q)uit
:q! = (q)uit!, discarding any changes
Just those few things will let you use vim well enough while you're figuring out all the really cool stuff it can do.Emacs can be treated similiarly: C = control M = "meta", usually the alt or option key. You can use escape if you want.
C-x C-f = control x (do something) + control f (find file) - open a file
C-x C-s = save a file
C-x C-c = quit
C-k = (k)ill - this is similar to cut
C-y = yank - this is similar to paste
For emacs, it may be easier to start with cua mode - M-x cua-mode
(btw, m-x means "run this function")
Cua mode gives you a copy, cut and paste that works the same as your operating system.