diff --git a/vim/.vimrc b/vim/.vimrc index e8b910d..8da0b58 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,13 +1,17 @@ " Change Leader key let mapleader=',' -" Change syntax highlight scheme for GUI -" and set a dark background for console +" Vim / Gvim settings if has('gui_running') + " Change syntax highlight scheme for GUI colorscheme desert set guioptions-=T "remove toolbar else + " Set a dark background for console set background=dark + " Set a low timeout for commands to + " avoid vim's lag on console + set ttimeoutlen=100 endif " Enable bash-like completion @@ -92,3 +96,9 @@ map v "+gP vnoremap x "+ygvd vnoremap c "+ygv +" Disable caps when exiting insert-mode +function! CapsOff() + :silent execute "!~/bin/togglecaps.py off > /dev/null 2>&1 &" +endfunction +autocmd InsertLeave * call CapsOff() +