"Syntax "{{{ filetype plugin indent on syntax enable syntax sync maxlines=100 set synmaxcol=200 augroup customft autocmd! autocmd BufNewFile,BufRead *.vim* set filetype=vim augroup END "}}} "Options "{{{ set expandtab set shiftwidth=4 set tabstop=4 set foldlevel=99 set encoding=utf-8 set number set showmatch set matchtime=2 set hlsearch set incsearch set laststatus=2 "set splitbelow "}}} "Gui stuff "{{{ set guicursor=n-v-i-c:block-Cursor set guicursor+=n-v-i-c:blinkon0 set guioptions-=e set guioptions-=l set guioptions-=L set guioptions-=r set guioptions-=R set guioptions-=m set guioptions-=T set langmenu=en_US.UTF-8 "}}} "Colors "{{{ set t_Co=256 ""}}} "Tagbar stuff "{{{ let g:tagbar_autofocus = 1 "}}} "YouCompleteMe stuff "{{{ set completeopt-=preview let g:ycm_autoclose_preview_window_after_completion = 1 set shortmess+=c "}}} "Coding style "{{{ augroup badstyle autocmd! autocmd BufWinEnter * let w:m1 = matchadd('Unstylish', '\%81v.') autocmd BufWinEnter * if &ft != 'make' && &ft != 'gitcommit' | \ let w:m2 = matchadd('Unstylish', '\t') | endif augroup END augroup trailingwhite autocmd! autocmd BufWinEnter,InsertLeave * match TrailingWhite autocmd InsertEnter * match TrailingWhite '' augroup END "}}} "Mappings "{{{ let mapleader = "," let maplocalleader = "," nnoremap q nnoremap qn :nohl nnoremap ql :lclose nnoremap qq :cclose nnoremap qp :pclose nnoremap qh :helpclose nnoremap qN :NERDTreeClose nnoremap qT :TagbarClose if has('win32') let my_settings_file = "$HOME/vimfiles/plugin/settings.vim" else let my_settings_file = "$HOME/.vim/plugin/settings.vim" endif nnoremap sl :tabe $MYVIMRC nnoremap ss :execute 'tabe' my_settings_file nnoremap sv :source $MYVIMRC:execute 'source' my_settings_file nnoremap k nnoremap j nnoremap h nnoremap l nnoremap se :syntax enable nnoremap so :syntax off vnoremap " `>a"` vnoremap "+y onoremap p i( onoremap qd i" onoremap qs i' "}}} "Mappings for Plugins "{{{ nnoremap N :NERDTree nnoremap ] :YcmCompleter GoTo nnoremap ye :YcmShowDetailedDiagnostic nnoremap yf :YcmCompleter FixIt:ccl nnoremap yd :YcmDiags nnoremap T :TagbarToggle "}}} "Abbreviations "{{{ iabbrev rr return iabbrev itt import cabbrev w!! w !sudo tee > /dev/null % "}}}