Skip to main content

Editor from Hell

Harbin , China

Back, Down, Down, Front, Punch - Come over here!

Finish him

Vi vs Vim

vi vs vim.

Command Overview

Creating Files

ViVimDescription
:q, :q!, null:q, :q!, :qa!Close document, force close, close all
i, Esci, EscInsert Mode, Exit Insert Mode
:w, :w filename.txt, :wq!:w, :w filename.txt, :wq!Save file, Save fie with filename, Save and quit
:e filename.txt:e filename.txtEdit existing file

I am Developer - Vim

ViVimDescription
h,j,k,l (or cursor)h,j,k,l (or cursor)left, down, up, right
w, ew, ejump to next word, end of the word
(, ), {, }(, ), {, }Beginning/End of sentence or paragraph
/query/queryReplace query with the word you are searching for
##find instances of word under cursor in document
:linenumber:linenumberGo to line
Shift+G, double gShift+G, double gGo to end / beginning of file
Ctrl+f, Ctrl+bCtrl+f, Ctrl+bNext / previous page

Editing

ViVimDescription
d+w, d+), d+dd+w, d+), d+ddelete word, sentence, line
uuundo
y+w, y+), y+dy+w, y+), y+dcopy word, sentence, line
pppaste copied content
nullShift+v, Ctrl+vSelect line, select block

Customization

ViVimDescription
null:set number, :set nonumberAdd/Remove line numbering
null:set wrap linebreakAdd soft word wrap
nullvim -d file1 file2Show diff between two text files