dotfiles/editors/vim/vimrc

37 lines
999 B
VimL

set nocompatible
let mapleader = "\<Space>"
source ~/.vim/bundles.vim
source ~/.vim/ui.vim
source ~/.vim/autocommands.vim
source ~/.vim/ruby.vim
set backupdir=~/.vim/dirs/backups " store file backups here
set backupskip=/tmp/*,/private/tmp/*" " don't use backups for tmp files
set directory=~/.vim/dirs/swaps " store swap files here
set undofile " persistent undos
set undodir=~/.vim/dirs/undos " where to store undo histories
" For when you forget to sudo.. Really Write the file.
cmap w!! w !sudo tee % >/dev/null
" CTags
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
set tags=tmp/tags;/,./tmp/tags;/,tags;/,./tags;/
set pastetoggle=<Leader>p
map <leader>p :set invpaste paste?<CR>
" Quick editing of common dot-files
map <Leader>vv :edit $MYVIMRC<CR>
map <Leader>gg :edit $MYGVIMRC<CR>
map <Leader>.. :cd ~/.config<CR>:enew<CR>
if filereadable(expand('~/.vimrc.local'))
source ~/.vimrc.local
endif
map <Leader><Leader> :Files<CR>