set nocompatible " Because what's even the point without this? set encoding=utf-8 " It's two thousand $year ! set hidden " Allow hidden buffers - something required this execute pathogen#infect() " Plugin config " vim-airline let g:airline_powerline_fonts = 1 let g:airline#extensions#tabline#enabled = 0 set noshowmode " Redundant - airline shows the mode " syntastic let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 0 let g:syntastic_check_on_wq = 0 let g:syntastic_cpp_compiler = "clang" let g:syntastic_cpp_compiler_options = "-std=c++14" " delimitMate let g:delimitMate_expand_cr = 1 let g:delimitMate_expand_space = 1 syntax on filetype plugin indent on " 256 colors and colorscheme "if $TERM =~ "256color" " set t_Co=256 "endif colorscheme slate " We have the tehnology for italics if $TERM =~ "italic" highlight Comment cterm=italic endif " Tell terminal my name set titlestring=vim\ %{expand(\"%t\")} " Indentation rules set expandtab " Tabs -> spaces set softtabstop=4 " Tabs -> spaces gooder set tabstop=4 " Show tabs as 4 spaces set shiftwidth=4 " Reident 4 spaces set cindent " C indentation rules set cinoptions=:0,g0 " Move 'public:' etc. to the left " Backups and swapfiles set backupdir=~/.vim/backup " Backups over there set directory=~/.vim/swap " Swapfiles over there set writebackup " Do actually do backups if has('persistent_undo') set undodir=~/.vim/undo " Persistent undo set undofile " See above endif " UI set number " Line numbers ... highlight LineNr ctermfg=darkgrey " ... in a better color set numberwidth=3 " Start linenumbers at 3 digits "set relativenumber " Line numbers relative to current location set laststatus=2 " Status line for file names set backspace=2 " Make backspace work set showcmd " Show incomplete commands set wildmenu " Menu for command mode set lazyredraw " Don't redraw the screen in macros etc. set showmatch " Highlight matching [{()}] set display=lastline,uhex " Show the last line even if it is too long set visualbell " I don't do bell sounds set scrolloff=2 " Show 2 lines of context "set listchars=tab:→\ ,trail:▸ "set list " Show hidden undesirable characters " Searching set incsearch " Search as you type set hlsearch " Highlight all matches set ignorecase " Ignore case on searching ... set smartcase " ... unless I use a capital " Folding set foldmethod=indent " Fold on indentation - should always be right (enough) set foldnestmax=3 " Don't fold too deep though set nofoldenable " And not by default plx " I hate typing - these make it (slightly) less painful nnoremap q: :q nnoremap :Q :q nnoremap :W :w let mapleader="," nnoremap gg=G nnoremap :nohlsearch nnoremap s :w nnoremap ? :tab help nnoremap b :buffers nnoremap m :exe "buffer" . v:count1 inoremap ; ; " Backup to /tmp except what's in /tmp set backup set backupdir=/tmp set backupskip=/tmp set directory=/tmp set writebackup " When moving between panes, C-hjkl instead of C-w C-hjkl nnoremap nnoremap nnoremap nnoremap