A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Vim experiment: Disable arrow keys


" EXPERIMENTAL

" Disable the arrow keys so you're forced to use h,j,k,l
" and other key bindings and will therefore be more productive
" an experiment

"  inoremap  <Up>     <NOP>
"  inoremap  <Down>   <NOP>
"  inoremap  <Left>   <NOP>
"  inoremap  <Right>  <NOP>
"  noremap   <Up>     <NOP>
"  noremap   <Down>   <NOP>
"  noremap   <Left>   <NOP>
"  noremap   <Right>  <NOP>

" cf the default statusline: %<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" format markers:
"   %< truncation point
"   %n buffer number
"   %f relative path to file
"   %m modified flag [+] (modified), [-] (unmodifiable) or nothing
"   %r readonly flag [RO]
"   %y filetype [ruby]
"   %= split point for left and right justification
"   %-35. width specification
"   %l current line number
"   %L number of lines in buffer
"   %c current column number
"   %V current virtual column number (-n), if different from %c
"   %P percentage through buffer
"   %) end of width specification
"set statusline=%<\ %n:%f\ %m%r%y%=%-35.(line:\ %l\ of\ %L,\ col:\ %c%V\ (%P)%)