haensl / vimdoc

A collection of vim commands & tricks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VIMDOC

A collection of vim commands & tricks.

Operate on tags (e.g. <p>...</p>)

cit # (change-in-tag)
dat # (delete tag and contents)

View manpage of command under cursor

K # (in command mode)

Revert document to an earlier/later version

:earlier 15m
:later 15m

Dump output of command into current buffer

:.! ls

To upper-/lowercase

viwu
viwU

View changelist

:changes

Move through changelist

g;
g,

Hex mode

:%!xxd
:%!xxd -r # back to normal mode

Reselect last visual selection

gv

Create HTML rendering of current buffer

:%TOhtml

Open file that's currently under the cursor

gf
gF # recognises [file name]:[line number]

Go to last/next position

ctrl+o # last
ctrl+i # next

Autocomplete file name

ctrl+x ctrl+f

Autocomplete line

ctrl+x ctrl+l

Go to shell

ctrl+z
fg # go back to vim

Autoindent block

=% # place cursor on brace and indent until closing brace

Paste word under line in command

# with cursor over word
ctrl+r ctrl+w

Join lines

J

About

A collection of vim commands & tricks.