" Allow Vim-only settings even if they break vi keybindings. set nocompatible " Always edit in utf-8: set encoding=utf-8 " Enable filetype detection filetype plugin on " General settings set incsearch "Find as you type set scrolloff=2 "Number of lines to keep above/below cursor set number "Show line numbers set wildmode=longest,list "Complete longest string, then list alternatives set pastetoggle= "Toggle paste mode set fileformats=unix "Use Unix line endings set history=300 "Number of commands to remember set showmode "Show whether in Visual, Replace, or Insert Mode set showmatch "Show matching brackets/parentheses set backspace=2 "Use standard backspace behavior set hlsearch "Highlight matches in search set ruler "Show line and column number set formatoptions=1 "Don't wrap text after a one-letter word set linebreak "Break lines when appropriate " Persistent Undo (vim 7.3 and later) if exists('&undofile') && !&undofile set undodir=~/.vim_runtime/undodir set undofile endif " Enable syntax highlighting if &t_Co > 1 syntax enable endif syntax on " When in split screen, map and to switch panes. nn  w nn  W " Custom key mapping map :redo map :tabn map :tabp " Uncomment the following to have Vim jump to the last position when " reopening a file if has("autocmd") au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") \| exe "normal! g'\"" | endif endif