vim cheatsheet

1
d delete navigation y copy/paste w/b fwd/bwd word W/B fwd/bwd full word e/E end of word fx fwd. to char. “x” ( start of sentence ) end of sentence 0/$ start/end of line { start of paragraph } end of paragraph /ab search fwd to “ab” ma mark position as “a” `a return to pos. “a” C-b/f Page up/down Hello there! Vim is a modern version of Vi, the venerable Unix text editor. Here is a cheat sheet for Vim. This line ends here. So. This is some silly samp;le text to demo navigation. In Vim. A new line. w e E W 2W fn ) $ b } ( tV 0 Combine navigation with commands to do powerful things A Basic Vim Cheat Sheet Source: http://code.ahren.org/ License: http://creativecommons.org/licenses/by-sa/3.0/ Vim Modes Command Line Mode w save file q quit vim e edit new file Write/Insert Mode mode to enter text Different sets of actions can be performed in each mode cursor position : esc i,o,a esc Command Mode navigation/modification This command moves cursor here c change cw change word cW change full word ce chg to word end cfx chg to char. “x” c( chg to sent. start c) chg to sent. end ... so on ... cc change line r repl char @ cursor R replace multiple ~ chg case @ cursor c`a chg to pos. “a” dw delete word dW delete full word de del to word end dfx del to char. “x” d( del to sent. start d) del to sent. end ... so on ... dd delete line x del char @ cursor D del to end of line ... so on ... yw yank/copy word yy yank/copy line p paste yanked or deleted text miscellaneous u undo C-r redo J join lines C-x is short for Ctrl-x

Upload: juyoung-lim

Post on 20-Jul-2016

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Vim Cheatsheet

ddeletenavigation ycopy/pastew/b fwd/bwd wordW/B fwd/bwd full worde/E end of wordfx fwd. to char. “x”( start of sentence) end of sentence

0/$ start/end of line{ start of paragraph} end of paragraph

/ab search fwd to “ab”ma mark position as “a”`a return to pos. “a”

C-b/f Page up/down

Hello there! Vim is a modern version of Vi, the venerable Unix text editor. Here is a cheat sheet for Vim. This line ends here.So. This is some silly samp;le text to demo navigation. In Vim.A new line.

we

EW

2W

fn)

$

b

}

(tV

0

Combine navigation with commands to do powerful things

A Ba

sic

Vim

Che

at S

heet

Sour

ce: h

ttp://

code

.ahr

en.o

rg/

Lice

nse:

http

://cr

eativ

ecom

mon

s.or

g/lic

ense

s/by

-sa/

3.0/

Vim Modes

Command Line Modew save fileq quit vime edit new file

Write/Insert Modemode to enter text

Different sets of actions can be performed in each mode

cursor position

: esc

i,o,aesc

Command Modenavigation/modification

This

co

mm

and

moves cursor here

cchangecw change wordcW change full wordce chg to word endcfx chg to char. “x”c( chg to sent. startc) chg to sent. end

... so on ...

cc change liner repl char @ cursorR replace multiple~ chg case @ cursor

c`a chg to pos. “a”

dw delete worddW delete full wordde del to word enddfx del to char. “x”d( del to sent. startd) del to sent. end

... so on ...

dd delete linex del char @ cursorD del to end of line

... so on ...yw yank/copy word

yy yank/copy line

p paste yanked or deleted text

miscellaneousu undo

C-r redoJ join lines

C-x is short for Ctrl-x