Introduction to VIM
Normal mode (Default)
Default mode when you open a file.
Moving around
h: leftj: downk: up-
l: right ctrl+d: page down-
ctrl+u: page up gg: going to the top-
Ggoing to the bottom bjump one word back-
wjump one word forward /textsearches for textngo to next searchNgo to previous search#backward search on word under cursor-
*forward search on word under cursor $jump to end of line0jump to start of line
Visual mode v
Used for Selecting. Press esc to go back to normal mode.
ddelete/cutycopyuundoppaste
Insert mode i, I, a, A
Press esc to go back to normal mode.
Command mode :
:12jump to line
Exitting
:wqSave and exit:q!Exit without saving
Running commands :!
:!pwd Find current working directory
Vim configuration
Add these to ~/.vimrc
set hlsearch
set incsearch
set autoindent
set smartindent
set ruler
syntax on
filetype plugin indent on