Vim settings for ubuntu cd vi .vimrc add these lines to opened file set nocompatible set expandtab set shiftwidth=4 set tabstop=4 set smartindent set autoindent and save .vimrc file.