" VIM configuration " Basic options {{{ syn on set nu set background=dark set nobackup set nowritebackup set noswapfile set noautoindent set nosmartindent set tabstop=2 set shiftwidth=2 set expandtab set mouse=a set autoread set nocompatible set laststatus=2 set shortmess+=I set ignorecase set smartcase set timeoutlen=1000 "let mapleader="-" let mapleader=" " " }}} " Filetype and syntax handling {{{ " Filetype handling filetype plugin indent on " Syntax highlighting syntax on " Syntax check let g:syntastic_mode_map={ 'mode': 'passive', \ 'active_filetypes': [], \ 'passive_filetypes': [] } " }}} " Folding {{{ " Disabled due to slowness "set foldmethod=syntax "set foldlevelstart=99 "let g:sh_fold_enabled=1 "let javaScript_fold=1 "let perl_fold=1 "let php_folding=1 "let r_syntax_folding=1 "let ruby_fold=1 "let sh_fold_enabled=1 "let vimsyn_folding='af' "let xml_syntax_folding=1 " }}} " Command mode completion {{{ " See https://stackoverflow.com/questions/526858/how-do-i-make-vim-do-normal-bash-like-tab-completion-for-file-names "set wildmode=longest,list set wildmode=longest,list,full set wildmenu " }}} " Disable modelines {{{ " " https://lwn.net/Articles/20249/ " http://usevim.com/2012/03/28/modelines/ " http://www.techrepublic.com/blog/it-security/turn-off-modeline-support-in-vim/ set nomodeline set modelines=0 }}} " Session management {{{ " " http://usevim.com/2013/07/05/sessions/ " https://github.com/xolox/vim-session " https://github.com/tpope/vim-obsession " http://stackoverflow.com/questions/1642611/how-to-save-a-session-in-vim " https://bocoup.com/weblog/sessions-the-vim-feature-you-probably-arent-using/ " http://vimdoc.sourceforge.net/htmldoc/usr_21.html#21.4 " https://github.com/xolox/vim-session?tab=readme-ov-file#options "let g:session_autosave_periodic=1 set sessionoptions-=buffers set sessionoptions-=blank set sessionoptions-=resize set sessionoptions-=winsize set sessionoptions-=winpos let g:session_autosave_silent=1 let g:session_autosave='yes' let g:session_autoload='no' let g:session_directory='~/.local/share/vim/sessions' " }}}