mirror of https://github.com/bjeanes/dotfiles.git
49 lines
1.1 KiB
VimL
49 lines
1.1 KiB
VimL
set nocompatible
|
|
|
|
source ~/.vim/ui.vim
|
|
source ~/.vim/autocommands.vim
|
|
source ~/.vim/bundles.vim
|
|
|
|
" For when you forget to sudo.. Really Write the file.
|
|
cmap w!! w !sudo tee % >/dev/null
|
|
|
|
" This helps with RVM etc
|
|
set shell=zsh
|
|
|
|
" CTags
|
|
map <Leader>rt :!ctags --extra=+f -R *<CR><CR>
|
|
set tags=tmp/tags;/,./tmp/tags;/,tags;/,./tags;/
|
|
|
|
" ,w - write file
|
|
nnoremap <silent> ,w :write<CR>
|
|
|
|
" ,N - toggle line numbers
|
|
function! ToggleLineNumbers()
|
|
if &number
|
|
set nonumber
|
|
elseif &relativenumber
|
|
set number
|
|
else
|
|
set relativenumber
|
|
endif
|
|
endfunction
|
|
nnoremap <silent> ,N :call ToggleLineNumbers()<CR>
|
|
|
|
" Theme development help
|
|
nmap <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>
|
|
|
|
" 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>
|
|
|
|
set pastetoggle=<Leader>p
|
|
map <leader>p :set invpaste paste?<CR>
|
|
|
|
if filereadable(expand('~/.vimrc.local'))
|
|
source ~/.vimrc.local
|
|
endif
|
|
|