" Just a note - C-W-f - open file under cursor in new window " and gf - open in current window " No, it is not VI, it is VIM! It is important to set this first, because this " command reset many other options. set nocompatible set virtualedit=all " Character you have to type to start wildcard expansion in the " command-line, as specified with 'wildmode'. set wildchar= " turn off error bells set noeb " turn on visual bell set vb " interpret tab as an `indent' command instead of an insert-a-tab command set softtabstop=4 "indent with two spaces when hitting tab set shiftwidth=4 " not expand tabs set noexpandtab " just sugar set background=dark " enable syntax syntax on " allow backspacing over everything in insert mode set bs=2 " always set autoindenting on set ai let g:hostname = system("hostname") if v:shell_error let g:hostname = 'unknown' else if g:hostname =~ "jesus" endif endif let g:uname_tmp = system("uname") if v:shell_error let g:uname_tmp = 'unknown system' else if g:uname_tmp =~ "SunOS" " fix solaris fucking backspace set backspace=indent,eol,start endif endif " VIM tip #80 " Author: Charles E Campbell " When editing a file, always jump to the last cursor position (if saved) au BufReadPost * if line("'\"") > 0 | \ if line("'\"") <= line("$") | \ exe "norm `\"" | \ else | \ exe "norm $" | \ endif | \ endif " Generic/interface settings set noendofline " No will be written for the last line in the file set lazyredraw " Do not update screen while executing macros set nostartofline " Keep curosr's column " Text settings set noautoindent " Do not copy indent from current line when starting a new line set backspace=2 " Backspace over indent, eol, start set nojoinspaces " Do not insert two spaces after a '.', '?' and '!' with a join command set notextmode " Don't append bloody carriage returns " Search settings set smartcase " Match "word" case-insensitive and "Word" case-sensitive set ignorecase " Do case insensitive matching set incsearch " Incremental search " Misc set ttyfast " Indicates a fast terminal connection set mouse=ar " Use mouse in all modes, plus hit-return " Set beahviour to xterm, not mswin behave xterm " read/write a .viminfo file, don't store more " than 50 lines of registers " set viminfo='20,\"50 set viminfo='20,f1,\"1000,%,n~/.viminfo set history=500 " keep 50 lines of command line history set ruler " show the cursor position all the time set modeline set hidden set showmatch set aw set autowrite "set linebreak set showcmd " Show (partial) command in status line. set showmatch " Show matching brackets. " no wrap set nowrap " switch between windows imap map " Save on F2 map :w imap :w " S-INS map map! " window resizing by ctrl and keypad +/- map :res +1 imap :res +1 map :res -1 imap :res -1 if has("gui_running") " Turn off toolbars, menus etc. set guioptions+=a set guioptions-=T set guioptions-=r set guioptions-=m set guioptions-=l set lines=32 else colorscheme desert endif