Show Menu

vim mappings Cheat Sheet by

Vim mappings for https://github.com/frazrepo/vimrc
vim

General

<le­ade­r>
space
<le­ade­r>w
Save buffer
<le­ade­r><­lea­der>
noh
<le­ade­r>cd
cd to buffer dir
jk
ESC
:W
Write as sudo (linux)
{to-m}
Text Object or Motion

Windows

<C-­h>
Navigate left
<C-­l>
Navigate right

Buffers

<le­ade­r>bn
New buffer
<le­ade­r>bd
Close current buffer
<le­ade­r>ba
Close all buffers
<ba­cks­pac­e>
Go to alternate buffer
<le­ade­r>x
Scratch txt buffer
<le­ade­r>s
Scratch sql buffer
<le­ade­r>d
Scratch markdown buffer
<le­ade­r>h
Previous buffer
<le­ade­r>l
Next buffer

Tabs

<le­ade­r>tn
New tab
<le­ade­r>te
New Tab (current buffer dir)
<le­ade­r>to
TabOnly
<le­ade­r>tc
Close Tab
<le­ade­r>tm
Move Tab
<le­ade­r>tl
Go to alternate Tab
<le­ade­r><­bs>
Go to alternate Tab

Miscel­laneous

F3
Autoformat
F8
Toggle QuickFix Window
F9
Toggle CtrlSF Window
F10
Rotate ColorS­chemes
F11
Toogle TagBar
F12
Tag navigation
<M-­0>
Set font bigger
<M-­9>
Set font smaller
<le­ade­r>z
Toogle Zen Mode

Commands

:Rainb­owT­oggle
Toggle rainbow colors
:HardT­ime­Toggle
Toogle hardtime mode
:Visua­lBlock
Enter visual mode (xterm)
:ListL­eaders
List all leader mappings
:{Rang­e}S­ort­ByWidth
Sort lines by witdh
:h fz-regexp
Custom regexp help
:h fz-macro
Custom macro help
 

Editing - Normal mode

"p
Like vi"p
'p
Like vi'p
(p
Like vi(p
)p
Like vi)p
g=
Equalize entire buffer
gQ
Format entire buffer
<le­ade­r>m
Remove bad formatting ^M

Editing - Insert Mode

<M-­o>
Insert new line below
<M-­O>
Insert new line above
<C-­Spa­ce>
AutoCo­mpl­etion (<C­-n>)

Editing - Visual Mode

*
Search Visual Selection
#
Reverse Search Visual Selection
<le­ade­r>r
Search and Replace Selection
<le­ade­r>fr
Find Replace Visually

Searching

/
/\v magic search
?
?\v magic search
K
Search current word with Ctrlsf
<C-­f>f
Search in files with Ctrlsf
<le­ade­r>f
Search buffer using Ilist
ym
Yank search matches
YM
Yank reverse search matches
dm
Delete search matches
DM
Delete reverse search matches
c*
Change current word and . for next
 

Emmet Plugin

,,
Generate html block (2 commas)

vim-lion

gl{to-m}=
Right align with =
gL{to-m}
left align with =

vim-ab­olish

Subvert
Search Command
cr{case}
Coercion, change case

vim-ex­change

cx{to-m}
Works in pair
cxx
Exchange line
X
Visual mode

vim-op­era­tor­-re­place

{"re­g}g­r{to-m}
Replace

vim-sa­ndwitch (surround)

cs"', css
Change surround " to '
ys{to-­m}"
Add surround "
ds", dss
Delete surround "
S"
Visual mode surround
yss"
Surround line

Transpose

Tranpose
simple
Tranpo­seCSV
csv
Tranpo­seWords
word

vim-gu­tentags

<C-­$>
Tag navigation

vim-so­rt-­motion

gs{to-m}
Sort

Custom text objects

u
Uri (ciu)
q
Quote (ciq)
c, C
Column (vic, viC, vac, vaC)
i
Indent (cii)
l
Line (cil)
e
Entitre (cie)
Targets
cin(, ci=, ci+, ci_, ...

vim-un­imp­aired

( and )
map keys
(*
Previous * =t, b,...
)*
Next * = t,b,..
(e or )e
Exhange lines
(space
Insert blank line
yo*
Toggle options * = n,r,w,x, ...

Miscel­laneous

<C-­p>
fzf Files
<le­ade­r>bb
fzf Buffers
<le­ade­r>u
fzf MRU
<le­ade­r>nn
NerdTree
<le­ade­r>t
Tags
!n /!p
yankstack next/p­revious
Arrow keys
move visual selection
)' or ('
Marks navigation

Download the vim mappings Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/fraz_vim-mappings.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          VI Editor Cheat Sheet
          Vim NERDTree Cheat Sheet
          cVim Keyboard Shortcuts

          More Cheat Sheets by fraz

          Vim Muscle Memory Cheat Sheet