Show Menu
Cheatography

Yograf Keyboard Shortcuts by

Unite

b
buffers
CTRL-p
Search project

nVim

[<Space>
Add new line before
]<Space>
Add new line after
[e
Exchange the current line with [count] lines above it.
]e
Exchange the current line with [count] lines below it
,h
Remove Hilight
<C-­z> after fg
Stop vim and continue after
:!<­com­man­d>
Run prompt command
gn/gN
Visual mark searched text
<C-­r>
Paste on insert mode
zi
Folding on/off
<sp­ace>
Open close fold
zc
Close parent folds also
zM
Close all folds
zv
open fold where cursor
zf
manual fold visually selected

Screen

 

Move lines

command ::::move
44/+3/-3 moves line
 

Copy paste

P
Paste before char

Multiple cursors

<C-­n>
Mark and move next
<C-­p>
Mark and move previous
<C-­x>
Skip

init.vim

,v
Edit init.vim
,s
Source init.vim

Tabs

TabooR­ename
<C-­w><­S-t>
Move pane into tab

Git

p on Gstatus
intera­ctive hank add
:Gstatus
Status of the files
-
Add/Remove files from index
Gdiff
vimDiff for the file we're on
]c
Advance to the next block with differ­ences
[c
Previous diff
do
Get hunk from the other pane
dp
Push hunk to the other pane
zo/zc
fold open/close
zr/zm
Complete file open/close
<S-­c> or :Gcommit
on :Gstatus commit

JavaScript

,p
Prettier
 

Delete / Change

dw/db
Delete next/p­revious word
cw/cb
Change next/p­revious word
dd/cc
Delete­/Change entire line
dj/cj
Delete­/Change two lines downward
dk/ck
Delete­/Change two lines upward
d/c [motion]
Delete­/Change according to motion
di'/ci'
Delete­/Change inside '
da'/ca'
Delete change include '
=3j
Autoindent 3 lines down

Search and Replace

/
Search
?
Search before
:%s/ol­d/new
Replace
:%s/ol­d/new/c
prompt before
:%s/ol­d/new/g
globally
:%s/ol­d/n­ew/gcI
change globally case instin­ctive
:5,12s/foo/bar/g
Change each 'foo' to 'bar' for all lines from line 5 to line 12 (inclusive)
:.,+2s­/fo­o/bar/g
Change each 'foo' to 'bar' for the current line (.) and the two next lines (+2)

Splits

<C- h/j/k/­l>
Move to * pane
<C-­w> +/-
Increa­ce/­Dec­rease pane height
<C-­w> >/</=
Increa­ce/­Dec­rea­se/­Equal pane width
<C-­w> o
Close all splits but the one is active

Unite

<Sp­ace­>/
Search lines
<C-­p>
Search files
<Sp­ace­>b
Search buffers
<Sp­ace­>y
Search yanked text
<Sp­ace­>t
Switch tab

Terminal

<es­c>
exit terminal mode

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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.

          More Cheat Sheets by yograf

          cVim Keyboard Shortcuts