Permalink
Browse files

Added auto-disabling caps-lock when leaving insert mode.

  • Loading branch information...
1 parent be42d28 commit a365945c679fe76815ccb5ce74679ca833191467 @ricobl committed Sep 13, 2010
Showing with 12 additions and 2 deletions.
  1. +12 −2 vim/.vimrc
View
@@ -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 <Leader>v "+gP
vnoremap <Leader>x "+ygvd
vnoremap <Leader>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()
+

0 comments on commit a365945

Please sign in to comment.