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
Original file line number Original file line Diff line number Diff line change
@@ -1,13 +1,17 @@
" Change Leader key " Change Leader key
let mapleader=',' let mapleader=','


" Change syntax highlight scheme for GUI " Vim / Gvim settings
" and set a dark background for console
if has('gui_running') if has('gui_running')
" Change syntax highlight scheme for GUI
colorscheme desert colorscheme desert
set guioptions-=T "remove toolbar set guioptions-=T "remove toolbar
else else
" Set a dark background for console
set background=dark set background=dark
" Set a low timeout for commands to
" avoid vim's lag on console
set ttimeoutlen=100
endif endif


" Enable bash-like completion " Enable bash-like completion
Expand Down Expand Up @@ -92,3 +96,9 @@ map <Leader>v "+gP
vnoremap <Leader>x "+ygvd vnoremap <Leader>x "+ygvd
vnoremap <Leader>c "+ygv 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.