syntax on set number relativenumber set hlsearch set ignorecase set incsearch set tabstop=4 set shiftwidth=4 set expandtab set foldmethod=syntax source ~/.config/vim/code.vim source ~/.config/vim/text.vim source ~/.config/vim/links.vim " Stolen auto mkdir code function s:MkNonExDir(file, buf) if empty(getbufvar(a:buf, '&buftype')) && a:file!~#'\v^\w+\:\/' let dir=fnamemodify(a:file, ':h') if !isdirectory(dir) call mkdir(dir, 'p') endif endif endfunction augroup BWCCreateDir autocmd! autocmd BufWritePre * :call s:MkNonExDir(expand(''), +expand('')) augroup END