Vim

From Vague Hope Wiki
Revision as of 03:28, 1 September 2011 by Haku (Talk | contribs) (Created page with "<pre> select: v (then y, d, etc.) delete current chr and insert: s copy: y copy word: yw copy 2 words: y2w past after: p past before: P enter inserd mode after current chr: ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
select: v
  (then y, d, etc.)

delete current chr and insert: s

copy: y
copy word: yw
copy 2 words: y2w
past after: p
past before: P

enter inserd mode after current chr: a
deletes the current line and leaves the cursor in insert mode: cc
swap 2 lines: ddp
Deletes to the end of the line: D
Deletes to the end of the line and leaves the cursor in insert mode: C

Moves the cursor to the first non-white space character on the line: ^
Moves the cursor to the beginning of the line: 0
Moves the cursor to the end of the line: $

gu{motion} Changes text to lowercase.
gU{motion} Changes text to uppercase.

Centres current line vertically in the window: zz