From 4d8da43b859e80fdaf005eb71394cac615f75146 Mon Sep 17 00:00:00 2001 From: Adam Hovorka Date: Mon, 17 Jul 2017 15:48:20 -0600 Subject: Added base16-default-dark colors, .vimrc.local, misc. tweaks --- base/.vimrc | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'base/.vimrc') diff --git a/base/.vimrc b/base/.vimrc index fa798ff..b8e83cc 100644 --- a/base/.vimrc +++ b/base/.vimrc @@ -20,13 +20,12 @@ nnoremap ; : syntax on filetype plugin indent on -set t_Co=256 " enable 256-color mode. +set t_Co=256 " force enable 256-color mode. if &t_Co >= 256 || has("gui_running") - "colorscheme mustang - "colorscheme desert " set colorscheme + let base16colorspace=256 + colorscheme base16-default-dark endif if &t_Co > 2 || has("gui_running") - " switch syntax highlighting on, when the terminal has colors syntax on endif @@ -76,7 +75,7 @@ set visualbell " don't beep set noerrorbells " don't beep set list -set listchars=tab:>.,trail:.,extends:#,nbsp:. +set listchars=tab:»\ ,extends:›,precedes:‹,nbsp:·,trail:· "autocmd filetype html,xml set listchars-=tab:>. set wildmenu @@ -85,17 +84,14 @@ set wildignore=*.swp,*.bak,*.pyc,*.class set ttyfast +hi ColorColumn ctermbg=18 hi Folded ctermbg=0 ctermfg=12 " Stop using arrow keys ====---- -nnoremap -nnoremap -nnoremap -nnoremap -inoremap -inoremap -inoremap -inoremap +noremap +noremap +noremap +noremap " nnoremap j gj " nnoremap k gk @@ -128,10 +124,12 @@ set noswapfile " Note: swap helps large files. " Custom mappings ====---- " Quickly edit/reload the vimrc file -nnoremap ev :e $MYVIMRC -nnoremap sv :so $MYVIMRC +nnoremap ve :tabe $MYVIMRC +nnoremap vs :so $MYVIMRC +nnoremap :set invpaste paste? set pastetoggle= +set showmode nnoremap W :%s/\s\+$//:let @/='' nnoremap ft Vatzf @@ -198,6 +196,22 @@ nnoremap N :call NumberToggle() autocmd InsertEnter * :set number autocmd InsertLeave * :set relativenumber +" Custom functions ====---- + +function! SetLocalOptions(fname) + let dirname = fnamemodify(a:fname, ":p:h") + while "/" != dirname + let lvimrc = dirname . "/.vimrc.local" + if filereadable(lvimrc) + execute "source " . lvimrc + break + endif + let dirname = fnamemodify(dirname, ":p:h:h") + endwhile +endfunction + +au BufNewFile,BufRead * call SetLocalOptions(bufname("%")) + " To move elsewhere ====---- au BufNewFile,BufRead *.less set filetype=less -- cgit v1.2.3-70-g09d2