dotfiles/editors/vim/vimrc

40 lines
1.0 KiB
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> :GFiles<CR>
map <Leader>t :Files<CR>
hi Normal ctermbg=none