Show Menu
Cheatography

Viminal Cheat Sheet by

Terminal and Vim commands

Vim

%s/wha­tIs­ear­ch/­wha­tIc­hange/g
change and replace all occurr­ences
ctrl + p
search for file
shift + v
select
o
insert a new line in the EM
ctrl + v, shift + i (write what you want), esc + esc
column selection mode
x
delete character
A
EM in the end line
dw
delete word (need to be in the begin)
d$
delete from the CP until the EL
d0
delete from the CP until the BL
d<a­mou­nt>w
delete x words
dd
delete line
<am­oun­t>dd
delete x lines
u
undo
U
undo entire line
ctrl + r
redo
w
move between words
0
go to the begin of the line
$
go to the end of the line
dd + p
delete line and past below where you are
r<c­har­act­er>
replace the current char with the one that you type
Yp
copy and paste line
shift + g
go to the end of the file
I (izão)
begin of the line EM
put everything in upper case
select (with v) and press U
put everything in down case
select (with v) and press u
substitute word in a file
:s
do a macro
qa + yourco­mmands + q, and then @a to do it again
correct words or use shortcut
:abbr Lunix Linux
repeats the last command
.
delete to the end of the line
S
changes case
~
replace something in column mode
ctrl + v, c (write what you want), esc + esc
EM = edit mode
CP = current place
EL = end of the line
BL = begin of the line
 

vim

ctrl + g
show inform­ation about the file
c$
delete the rest of the line and enter in IM
ce
delete the rest of the word and enter in IM
r<c­har­act­er>
replace the current caracter with what you type
<nu­mbe­rOf­The­Lin­e>G
back to the line you were
/<t­ext>
search for the text after the place you are
n
go to the next occurrence
N
go to the previous occurrence
?<t­ext>
search for the text before the place you are
% (on a brackets or parent­heses)
go to the corres­ponding bracke­t/p­are­ntheses
:s/the­e/the
change the first occurrence in the current line from thee to the
:s/the­e/the/g
change all the occurr­ences in the current line from thee to the
:%s/ol­d/new/g
to change every occurrence in the whole file
:%s/ol­d/n­ew/gc
to find every occurrence in the whole file, with a prompt whether to substitute or not.
gg
moves to the first line of the file
:!<­ter­min­alc­omm­and>
execute and show the result of a terminal command
:w
save changes to the file
:w <no­meo­fth­efi­le>
create the file with the name typed
o
create a new line in the IM below where you are
O
create a new line in the IM above where you are
a
insert text after the cursor
e
go to the next word
R<t­ext>
replace more than one character
v and then select what you want
enter the visual mode
y
copy what is selected
p
past the copied text
j$
go to the end of the line below where you are
set hlc
highlight the matching phrases
<nu­mbe­r>j
go x lines below
e
go to the end of the word
b
go to the previous word
w
go to the next word
{
next paragraph
IM = insert mode
 

terminal and atom

ctrl + shift + r
reverse search (keep pressing to se the other results)
cmd + t
search a file
ctrl + `
open/close a terminal
ctrl + tab | ctrl + shift + tab
go to next tab | go to previous tab
cmd + shift + ] | cmd + shift + [
go to next tab | go to previous tab
cmd + \
hide the tree view
ctrl + 0
focus on the tree view / back to the file
a (in the tree view)
add a file
cmd + shift + p
search command and options
A: rename file
select file and press m
A: atom
 

others

E: cmd + shift + f
simple format
E: cmd + shift + h
insert a horizontal line
E = evernote
 

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.