Cheatography
https://cheatography.com
I've been using Vim for a more than a year. This is my collection of intermediate-level features I want to get more comfortable with!
Legend
special keys are surrounded by < > |
e.g.: <CTRL-c>
= control-c |
tokens are surrounded by { } |
e.g.: {#}
= some number, {id}
= some id |
Navigation & Searching
next word |
|
previous word |
|
end of word |
|
forward one screen |
|
back one screen |
|
forward half screen |
|
back half screen |
|
search for word under cursor |
|
Files
Always set working directory to current file |
|
File explorer |
|
OS file explorer |
|
name of current file |
|
Search for file in hierarchy and open it |
|
Set working directory to current file |
|
Save file with no eol |
|
|
|
Editing
open new line for insert above cursor |
|
open new line for insert below cursor |
|
change current word |
|
change entire line |
|
change rest of line |
|
replace current character |
|
replace all text until <ESC> is typed |
|
swap characters |
|
delete forward |
|
delete backward |
|
delete to the end of the line |
|
delete forward one word |
|
deletes # lines |
|
toggle case |
|
toggle case of word |
|
delete blank lines |
|
delete trailing white space |
|
delete all extra white space between words |
|
insert chars # times |
<CTRL-o>{#}{chars}<ESC>
|
Selecting & Copying
match braces |
|
select all |
|
copy forward one word |
|
copy from cursor to the end of line |
|
copy # lines |
|
|
|
Tabs and Windows
split window and load another file |
|
move cursor to another window |
|
maximize current window |
|
make all equal size |
|
close all other windows |
|
next tab | prev tab |
|
Registers & Buffers
show name and contents of registers |
|
paste what's in register a |
|
yank selection into register a |
|
record into register a (q again to stop) |
|
execute register a |
|
repeat last one |
|
List buffers |
|
Display buffer by id |
|
Next and prev buffer |
|
Delete buffer by id |
:bd{id}
(append ! to discard changes) |
Surround.vim
change surroundings |
cs{from_char}{to_char}
|
delete surroundings |
|
surround word |
|
surround line |
|
|
Created By
www.pasz.com
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets