To get these settings enabled by default, add the lines to your vimrc file, it is usually located at ~/.vimrc if not, just create it. Below is a part of the .vimrc file I like using.
"set tabwidth to 4 characters, automatic indentation and stuff set tabstop=4 shiftwidth=4 set expandtab set smarttab set autoindent set smartindent "set searching case insensitive, but if you type uppercase, it will go case sensitive set ignorecase set smartcase "2 lines above/below cursor when scrolling set scrolloff=2 "show filename in title bar set title "show line numbers, and toggle it on/off with F2 set number map :set invnumber "toggle wrapping mode with Ctrl+w map :set invwrap "Reload Current File, ask for confirmation if changed map :confirm :edit "automatically cd into the directory that the file is in, very useful when running commands within vi autocmd BufEnter * execute "chdir ".escape(expand("%:p:h"), ' ') "highlight the current line, when you split screen, it will only highlight the line that has focus on hi CursorLine cterm=NONE ctermbg=blue ctermfg=NONE autocmd WinEnter * setlocal cursorline autocmd WinLeave * setlocal nocursorline set cursorline "set encoding to utf-8 set encoding=utf-8 "highlight search results set hlsearch "search while typing set incsearch