Skip to content

Commit

Permalink
Added auto-disabling caps-lock when leaving insert mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricobl committed Sep 13, 2010
1 parent be42d28 commit a365945
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions 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
Expand Down Expand Up @@ -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.