dotfiles/editors/vim/vimrc

45 lines
1.3 KiB
VimL
Raw Normal View History

2010-11-30 12:26:57 +11:00
set nocompatible
2016-07-04 17:37:15 +10:00
let mapleader = "\<Space>"
source ~/.vim/bundles.vim
2019-07-22 16:21:32 +10:00
source ~/.vim/coc.vim
2011-09-21 08:33:32 +10:00
source ~/.vim/ui.vim
source ~/.vim/autocommands.vim
2013-11-06 19:36:55 +11:00
source ~/.vim/ruby.vim
2011-09-21 08:33:32 +10:00
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
2019-07-22 16:21:32 +10:00
set autoread
2012-01-10 03:23:38 +11:00
2011-02-21 15:56:13 +11:00
" 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;/
2019-07-22 16:21:32 +10:00
"set pastetoggle=<Leader>pp
nmap <leader>pp :set invpaste paste?<CR>
2011-11-16 05:27:34 +11:00
2011-02-18 12:45:40 +11:00
" 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
2017-04-02 10:14:41 +10:00
map <Leader><Leader> :GFiles<CR>
map <Leader>t :Files<CR>
2019-07-22 16:21:32 +10:00
" For working on highlight/syntax rules
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
2017-04-02 10:14:41 +10:00
hi Normal ctermbg=none
2016-07-04 17:37:15 +10:00