vim cheat sheet

to open file

vim filename

to open file in read mode

vim -R filename

to open file on specific line number

vim filename +10

insert mode


escape / command mode


to write file


to minimize vim editor

Ctrl + Z

to see minimized files in vim


to open specific jobs

fg 1
fg +
fg -

search any word in vim editor

#then press N or Shift + N

search and replace word


go to specific line


show/hide line numbers in vim editor

:set number
:set nonumber

set tabstop

:set tabstop=4

set font color

:colorscheme murphy

vimdiff difference between 2 files

vimdiff file1 file2

Leave a Reply

Your email address will not be published. Required fields are marked *