Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

English mnemonics to Vim's shortcuts

Tags:

vim

I realize that Vim's main author is Dutch, so I'll settle for those as well. I'm interested, do Vim's "control keys" have equivalents in the english language? You know, Ctrl-O for Open, Ctrl-N for New and so on.

Some of Vim's "control keys" could be assigned some meanings

(a) append / (i) insert
(w) word / b (back one word)

These are just those that I thought off the top of my head.

Do they all have some meaning (:e ?)

I find it much easier to remember them if I know they mean something; they're not just randomly used keys.

like image 827
Rook Avatar asked Sep 13 '11 22:09

Rook


3 Answers

In normal mode:

  • a: append
  • b: beginning (of current or previous word)
  • c: change
  • d: delete
  • e: end (of current word)
  • f: find (next given character on current line)
  • g: go (used as "leader" for many commands)
  • h: left (only makes sense on the keyboard used by vi's author, same for jkl)
  • i: insert
  • j: down
  • k: up
  • l: right
  • m: mark
  • n: next (occurrence of last search)
  • o: open (new line below current line)
  • p: put (paste)
  • q: quote? (record a macro in given register)
  • r: replace
  • s: substitute
  • t: toward (next given character on current line)
  • u: undo
  • v: (enter) visual mode
  • w: (next) word
  • x: x-out (delete a single character)
  • y: yank
  • z: fold (it's visual, it looks like a folded sheet of paper)
like image 180
romainl Avatar answered Oct 31 '22 16:10

romainl


Some do. Check out this cheatsheet, it has a lot of mnemonics:

http://michael.peopleofhonoronly.com/vim/

Some of the more obvious ones:

  • y = yank
  • c = change
  • O = over
  • f = find
  • r = replace
  • u = undo
  • t = unTil character
like image 36
Ted Kalaw Avatar answered Oct 31 '22 18:10

Ted Kalaw


My mnemonic for ^ (go to beginning of line): ^ looks like a roof, roof symbolizes home. Home key moves your cursor to the start of line/document.

Look at ADM-3A keyboard layout: the Home key is used to print ^ and ~ symbols.

like image 3
Victor Bulatov Avatar answered Oct 31 '22 16:10

Victor Bulatov