M-A's

technology blog

Thursday 27 August 2009

vim / vimdiff notes

This message is for me only. I don't not expect you learn anything from this or even think this is useful.


Key
Action
Notes
ctrl+w, ctrl+w
switch windows
ctrl-w, J
Move the window down
do
diff obtain
doesn't work in 3-way?
dp
diff put
doesn't work in 3-way?
[c
previous difference
]c
next difference
:diffupdate
diff update
:syntax off
syntax off
zo
open folded text
zc
close folded text
:set paste
Disable auto-indent


v
select text
V
select lines
Ctrl-V
select vertical block
d
cut
y
yank (copy)
p
paste after the cursor
P
paste before the cursor
lv
selects an area equal to the yank buffer
lvp
replace paste
lNNvp
replace paste NN times
*y
yank to system clipboard


But this page is better: http://www.tuxfiles.org/linuxhelp/vimcheat.html
And the real reference: http://www.vim.org/htmldoc/quickref.html#quickref, accessible from inline help.
This one is awesome: http://jmcpherson.org/editing.html

No comments: