" ----------------------------------------------------------------------------- " .gvimrc " Stephen Niedzielski " ----------------------------------------------------------------------------- " Search " Match term as typed. se is " Ignore term case. se ic " Override ignorecase when a capital appears in the term. se scs " Highlight matches. se hls " Don't wrap searches. I never catch the wrap warning. se nows " ----------------------------------------------------------------------------- " Wrapping " Wrap long lines (display only) se wrap " Don't modify buffer to wrap long lines. se tw=0 " Break at chars spec by brk. " TODO: brk doesn't seem to be working right. It's breaking mid-word. se lbr " Wrap cursor movements at EOL & SOL. se ww=<,>,h,l,[,] " ----------------------------------------------------------------------------- " Display " Show non-printing characters. se list se lcs= "se lcs+=eol:$ se lcs+=tab:»\ se lcs+=trail:· " Highlight current line. se cul " Show line number gutter. se nu " Startup width. let &co=79+&nuw " Remove toolbar (icons) and menubar (file, edit, ...). se go-=T se go-=m " ----------------------------------------------------------------------------- " Indentation " Tabs occupy two characters. se ts=2 " Each indent level is two characters. se sw=2 " Disable indentation rules based on filetype. filet indent off " Something like 'just copy the previous line's indent'. se ai se ci se pi " ----------------------------------------------------------------------------- " Keys " For consistency, delete behaves like backspace in normal mode. If cursor is " not before EOL, it advances. fu! rc:del_fwd() cal cursor(0, getpos('.')[2]+1, 0) endf nm :call rc:del_fwd() " Tab navigation. map gt im gt map gT im gT map :tabe im :tabe " Route middle mouse single, double, triple, and quadruple clicks to left click " instead of paste. I frequently click the middle mouse button accidentally. map im map <2-MiddleMouse> im <2-MiddleMouse> map <3-MiddleMouse> im <3-MiddleMouse> map <4-MiddleMouse> im <4-MiddleMouse> " ----------------------------------------------------------------------------- " Miscellaneous " Use forward slashes in filenames. se ssl " Disable audible and visual bells in GUI and terminal. se vb t_vb= if has('win32') " Configure to use Cygwin Bash. se sh=bash " Argument specifying a command follows is '-c'. se shcf=-c " Wrap commands in double quotes. se sxq=\" en " Use Bash style autocompletion. se wim=list:longest " Disable autocompletion for files matching... se wig=*~,*.swp " ----------------------------------------------------------------------------- " Notes " :so % source file " :se tw=79 insert wrap " \v (very magic) extended regular expressions, similar to sed -r " se syntax=python " se enc=utf-8 " se ff=unix " se fdm=indent " # to highlight all matches udner cur " %!sort -u " 1!echo -e foo\\\nbar " ctrl-w q (unsplit) " | " elsei has('os2') " http://vim.wikia.com/wiki/Hex_dump " %!xxd " %!xxd -r - % " how not to lose contents on output?