开发者

English mnemonics to Vim's shortcuts

开发者 https://www.devze.com 2023-04-05 04:15 出处:网络
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 f

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 remembe开发者_运维百科r them if I know they mean something; they're not just randomly used keys.


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)


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消