VIM Cheat Sheet

A Programming › Programming cheat sheet in English by edendekker

My vim cheat sheet. Commonly used ones.

11,941 views 2,033 downloads 11 Apr 2020 History

Navigating

:vsplit other-­fil­e.txt
open new file in another vertical split window
:split other-­fil­e.txt
open new file in another horizo­ntally split window
CTRL+w
move current cursor to the next opened split window
gg
move to the begining of file
SHIFT+g
move to the bottom of file
w
move one word to the right
b
move one word backward to the left
:help
show main help file
:help '­cm'
show help file for cryptm­ethod
:help set
show help file for set

Saving

:w
save changes
:q!
quit and override
:setlocal cm=blo­wfish
set crypt method to blowfish
:X
encrypt file
:X key=
remove encryption

Editing Enviro­nment

:set number
enable line numbers
:set colorc­olu­mn=100
create a ruler guide at column 100
:syntax off
turn off syntax highli­ghting
:set tabstop=4
configure tab spacing
:set shiftw­idth=4
configure tab spacing
:set expandtab
configure tab spacing

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.