" ======================================================= " GENERAL " ======================================================= " load the bundles source ~/.vim/bundles.vim " Colorscheme if &t_Co <= 8 colorscheme desert else colorscheme Mustang endif " syntax coloring when supporting terminal if &t_Co > 2 syntax on endif " More general stuff set nu set fenc=utf-8 set modeline set ts=4 set sw=4 set sts=4 set expandtab set guifont=Inconsolata\ Medium\ 11,Monospace\ 11 set mouse=a set cursorline " new vsplit window on the right set splitright let mapleader = "," let maplocalleader = "\\" let &guicursor = &guicursor . ",a:blinkon0" " disable backups set nobackup set nowritebackup " statusline set laststatus=2 " always show line fun StatusLine() let ft = strlen(&ft)?&ft:"none" let fenc = strlen(&fenc)?&fenc:&enc."\ (G)" let head = fugitive#head(5) if strlen(head) let head = ",".head endif let tag = tagbar#currenttag('#%s', '') return '%-3.3n %f' \ .tag. \ ' %r%w[' \ .ft.','.fenc \ .',%{&fileformat}' \ .head \ .']%m%=%-14.(%l,%c%V%)%<%P' endfunction set statusline=%!StatusLine() " ======================================================= " COMPLETION FOR CMDLINE " ======================================================= " enable nice menu set wildmenu " do not use Left and Right for switching between completions, " but for cursor positioning cnoremap cnoremap " ======================================================= " CUSTOM MAPPINGS " ======================================================= " Some maps opening/closing nice windows nmap T :TagbarToggle nmap U :GundoToggle nmap P ToggleProject " others nmap :ls:buf nmap t :ToggleWord " Makes more sense and is similar to D map Y y$ " ======================================================= " PLUGINS AND LANGUAGES " ======================================================= " Word toggling let g:toggle_words_dict = { \ 'python': [ \ ['if', 'elif', 'else'] \ ], \ '*': [ \ ['enable', 'disable'], \ ['enabled', 'disabled'] \ ]} " we use python3 let g:gundo_prefer_python3 = 1 " Stuff for the TagList-Plugin let Tlist_Sort_Type = "name" let Tlist_File_Fold_Auto_Close = 1 let Tlist_Exit_OnlyWindow = 1 " Stuff for the NERD Tree Plugin let NERDTreeWinPos = 0 "have it on the right site " Autotag -- correct C++ handling let g:autotagCtagsCmd="ctags --c++-kinds=+p --fields=+iaS --extra=+q" " stuff for gentoo syntax let g:bugsummary_browser="firefox '%s'" " python syntax let g:python_highlight_string_templates = 0 let g:python_highlight_builtin_funcs_kwarg=0 let g:python_highlight_all = 1 let g:python_highlight_space_errors = 1 " use pipes instead of temp files let g:GPGUsePipes = 1 " Ultisnips let g:UltiSnipsEditSplit = "vertical" " YCM let g:ycm_semantic_triggers = {'haskell' : ['re!\w\.']} let g:ycm_autoclose_preview_window_after_completion = 1 let g:ycm_autoclose_preview_window_after_insertion = 1 " vimtex let g:vimtex_view_general_viewer = 'zathura' let g:vimtex_quickfix_latexlog = { \ 'overfull' : 0, \ 'underfull' : 0, \ } " Syntastic let g:syntastic_check_on_wq = 0 " ======================================================= " FINAL " ======================================================= " turn of any existing search if has("autocmd") au VimEnter * nohls endif