.vimrc
code:.vimrc
set tabstop=2
set autoindent
set expandtab
set shiftwidth=2
set number
set nocompatible
set noswapfile
filetype off
syntax enable
colorscheme desert
augroup vimrc-auto-mkdir " {{{
autocmd!
autocmd BufWritePre * call s:auto_mkdir(expand('<afile>:p:h'), v:cmdbang)
function! s:auto_mkdir(dir, force) " {{{
if !isdirectory(a:dir) && (a:force ||
\ input(printf('"%s" does not exist. Create? y/N', a:dir)) =~? '^y\%es$') call mkdir(iconv(a:dir, &encoding, &termencoding), 'p')
endif
endfunction " }}}
augroup END " }}}