How to use?

vim [argument] [file]

Types of command

Operator & Motion

Commonly used (cheatsheet)
:qa                 -   close all files
:qa!                -   close all files, abandone changes
:w                  -   save
:wq / :x            -   save and close file
:q                  -   close file
:q!                 -   close file, abandon changes
:n                  -   go to line n
:tabedit [file]     -   edit file in a new tab
:tabfind [file]     -   open file if exists in new tab
:tabclose           -   close current tab
:tabs               -   list all tabs
:tabn / gt          -   go to next tab
:tabp / gT          -   go to previous tab
:center [width]     -   alignment to center
:right [width]      -   alignment to right
:left               -   alignment to left
:%s/old/now/g       -   replace old with now
:saveas [file]      -   save file as
:noh                -   remove highlighting of search matches
:sp file            -   open a file in a new buffer and split window
:vsp file           -   open a file in a new buffer and vertically split window

$                   -   end of line
. (dot)             -   Repeat last command
0 (zero)            -   start of line
<                   -   indent left
>                   -   indent right
b / w               -   previous/next word
ctrl +              -   page up
ctrl + d            -   page down
ctrl + r            -   redo changes
d                   -   delete line (cut)
d / x               -   delete selection
G                   -   go to last line
gg                  -   go to first line
gu                  -   change to lowercase
gU                  -   change to uppercase
guu                 -   lowercase current line (also gugu)
gUU                 -   uppercase current line (also gUgU)
p                   -   paste
S                   -   delete line and insert
u                   -   undo changes
V                   -   enter visual line mode
v                   -   enter visual mode
y                   -   yank selection (copy)
yy                  -   yank line (copy)
`.                  -   Last change
Vundle (vim bundle)

Vundle is short for Vim bundle and is a Vim plugin manager, it allows you to

  1. Keep track of and configure your plugins right in the .vimrc
  2. Install configured plugins (a.k.a. scripts/bundle)
  3. Update configured plugins
  4. Search by name all available Vim scripts
  5. Clean unused plugins up
  6. Run the above actions in a single keypress with interactive mode
Minimalist color scheme (my choice)

mkdir ~/.vim/colors/; wget https://raw.githubusercontent.com/dikiaap/minimalist/master/colors/minimalist.vim -P ~/.vim/colors/

customize visual mode to be like this :
hi Visual ctermfg=167 ctermbg=239 cterm=NONE guifg=#1C1C1C guibg=#EEEEEE gui=NONE

Install plugin using vundle

apt/yum -y install git curl
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

cd ~ && touch .vimrc
vim .vimrc

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'kien/ctrlp.vim'
Plugin 'junegunn/fzf'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'tpope/vim-eunuch'
Plugin 'yegappan/mru'

call vundle#end()            
filetype plugin indent on 

syntax on
color minimalist
set number

"   set default indent width 
set tabstop=4
set shiftwidth=0
set expandtab

"   Set CTRLp default to open in new tab
let g:ctrlp_prompt_mappings = {
    \ 'AcceptSelection("e")': ['<c-t>'],
    \ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
    \ }

"   :PluginList       - lists configured plugins
"   :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
"   :PluginSearch foo - searches for foo; append `!` to refresh local cache
"   :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal

:w
:PluginInstall

|NERDTree| - |CTRLp| - |FZF| - |Multiple Cursors| - |Eunuch| - |MRU|


https://github.com/darinvhs/vimrc