# HG changeset patch # User Oleksandr Gavenko # Date 1268497620 -7200 # Node ID 7eeb81dc4fc59fe6d4f3f4e7ff9f31feadb37280 # Parent da1d92e3768df2ef71f889d6ade976cd8e813e91 Misc vim stuff. diff -r da1d92e3768d -r 7eeb81dc4fc5 .vimrc --- a/.vimrc Sat Mar 13 18:24:52 2010 +0200 +++ b/.vimrc Sat Mar 13 18:27:00 2010 +0200 @@ -2,17 +2,71 @@ syntax on -" Do not emulate old vi error. +" Do not emulate old vi bug. set nocompatible -" set ts=4 +" Same as set ts=4, by default - 8, how long TAB. set tabstop=4 +" Use spaces instead TAB. set shiftwidth=4 set smarttab set et +" Move cursor on RET to previous line indent. +set autoindent +" Indent for C-like languages. +set smartindent + +" This setting will cause the cursor to very briefly jump to a +" brace/parenthese/bracket's "match" whenever you type a closing or opening +" brace/parenthese/bracket. I've had almost no mismatched-punctuation errors +" since I started using this setting. +set showmatch + +" Turn on incremental search with ignore case (except explicit caps). +set incsearch +set ignorecase +set smartcase + +" I find the toolbar in the GUI version of vim (gvim) to be somewhat useless +" visual clutter. This option gets rid of the toolbar. +set guioptions-=T + + +" This setting prevents vi from making its annoying beeps when a command +" doesn't work. Instead, it briefly flashes the screen -- much less annoying. +set vb t_vb= + + +" This setting ensures that each window contains a statusline that displays +" the current cursor position. set ruler +" By default, search matches are highlighted. I find this annoying most of the +" time. This option turns off search highlighting. You can always turn it back +" on with :set hls. +set nohls + +" With this nifty option, vim will search for text as you enter it. For +" instance, if you type /bob to search for bob, vi will go to the first "b" +" after you type the "b," to the first "bo" after you type the "o," and so on. +" It makes searching much faster, since if you pay attention you never have to +" enter more than the minimum number of characters to find your target +" location. Make sure that you press Enter to accept the match after vim finds +" the location you want. +set incsearch + + +" By default, vim doesn't let the cursor stray beyond the defined text. This +" setting allows the cursor to freely roam anywhere it likes in command mode. +" It feels weird at first but is quite useful. +set virtualedit=all + +set ruler + +" Informative status line +set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%l/%L\ (%p%%)] + " Local Variables: " mode: fundamental " comment-start: "\""