" " {{{ info " " $Id: .vimrc,v 1.12 2005/04/12 12:17:49 aharriso Exp aharriso $ " " Installed Plugins: " " Align " Buffer Explorer " cvscommand " dbext " DrawIt " EnhancedCommentify " perl-support " project " taglist " winfileexplorer " winmanager " VimNotes " " Plugin Dependencies: " multvals " netrw " " For more tips, check out Leonid's page: " http://www.leonid.maks.net/writings/vim-for-perl-dev/ " " }}} " {{{ general mappings " conveniences noremap :wincmd H noremap :wincmd H:wincmd :wincmd _ noremap :wincmd p noremap :wincmd w noremap :wincmd W nmap :wincmd w nmap :wincmd W noremap :wincmd _ noremap :windo wincmd K noremap :wincmd = noremap :wincmd K map map zz za " open error window map :copen " }}} " {{{ settings " " {{{ Vim filetype on syn on " syntax highlighting on cwindow 30 " size of error window set nocp " 'compatible' is not set set ic " ignore case set bs=2 " allow backspacing over everything in insert mode set ai " always set autoindenting on set si " smart indent on set indentkeys="0{,0},:,!^F,o,O,e" " default, but without 0# set cinw+=# " so 'smart' indent won't start # at column 1. :( set sta " smart tab on set sts=4 " set soft tab stop (use same value as tabstop) set nobackup " do not keep a backup file, use versions instead set history=50 " keep 50 lines of command line history set ruler " show the cursor position all the time set sbr=\ \ \ \ ---> " showbreak string displayed when linewrapping set ts=4 " set tabstops to 4 spaces set sw=4 " set shiftwidth to 4 spaces set sr " round indent, uses tabstops for ctrl-d and ctrl-t set et " expand tabs to spaces set tw=60 " textwidth to 60 set showcmd " show partial commands set esckeys " allow arrow keys in insert mode set showmatch " show matching brackets set nohlsearch " don't highlight search patterns set incsearch " search while typing set magic " regexp chars have special meaning set ttyfast " Smoother changes set nostartofline " Keep cursor on same column when doing page movement set report=0 " show report on changes to file, 0 means all changes set wmnu " turn on wildmenu set wildchar= " Character for wildmenu completion set ww=<,>,h,l " whichwrap keys set nobackup " don't create backup files set formatoptions=acroq " format comments related to text width set commentstring=#\ %s " comment string for creating new folds with zf set comments+=b:-- " add the comment leader for .sql files set foldcolumn=2 " width of foldcolumn set matchpairs+=<:> " add another matched pair of characters set stl=%m%t\ %<\ \ %=%-10.20((%l,%c)%)\ buffer\ =\ [%-3.4n]%-r%6.6y " statusline "set shortmess=lnrxI " brief messages, don't show intro set viminfo='20,\"50 " read/write a .viminfo file, don't store more " than 50 lines of registers " my common tags file set tags+=/usr/home/ajharrison/.vim/commontags " Folding configuration set foldmethod=marker " Edit and uncomment next line if you want non-default marker " set foldmarker="[[[,]]]" set foldlevel=0 " " }}} " {{{ Align.vim " " extra mapping for Hash alignment: " " foo => "bar", " myfoo => "mybar", " " map th \WS:AlignCtrl mIp0P0=l => :'a,.Align\WE " vmap th :ma'>\th vm th :ma'>th no th :AlignCtrl mIp1P1=l:'a,.Align => no tas :AlignCtrl mI=lp1P1:'a,.Align AS vm tas :ma'>tas " " }}} " {{{ perl-support.vim " let g:Perl_AuthorName = "Andy Harrison" let g:Perl_AuthorRef = "" let g:Perl_Email = "foo@example.com" let g:Perl_Company = "GWI" let g:Perl_Project = "" let g:Perl_CopyrightHolder = "" let g:Perl_LoadMenus = "yes" " Insert header into new Perl files " if has("autocmd") autocmd BufNewFile *.\(pl\|pm\) call Perl_CommentTemplates('header') endif " has("autocmd") set makeprg=$VIMRUNTIME/tools/efm_perl.pl\ -c\ %\ $* set errorformat=%f:%l:%m " " }}} " {{{ project.vim " let g:proj_window_width = 40 " Default project window width let g:proj_flags = "imstcb" let g:proj_window_increment = 75 nmap ToggleProject " (below is for when I'm using a " term with a weird termcap) map [14~ :Project map OS :Project " " }}} " {{{ dbext.vim " let g:dbext_default_profile_PGSQL_generic = 'type=PGSQL:user=ajharrison:pass=foo:dbname=testcheck:host=localhost:port=5432' let g:dbext_default_buffer_lines = 20 let g:dbext_default_display_cmd_line = 1 " " }}} " {{{ drchip.vim " " Prevent DrChip from creating a new top level menu " let g:DrChipTopLvlMenu = "P&lugin.DrChip." " " }}} " {{{ bufexplorer.vim " nnoremap :VSBufExplorer map :GotoBufExplorerWindow map :GotoFileExplorerWindow " " }}} " {{{ winmanager.vim " map :WMToggle let g:favDirs = '/usr/home/ajharrison/.vim/plugin'."\n". '/usr/download'."\n". '/usr/home/ajharrison/stuff/scripts'."\n". '/usr/local/bin'."\n". '/usr/local/www'."\n" . '/usr/home/ajharrison/bin'."\n" . '/usr/home/ajharrison/GNUstep' " " }}} " {{{ taglist.vim " " map :Tlist nnoremap :Tlist nmap :exe ":ptag ".expand("") imap :exe ":ptag ".expand("") nnoremap :TlistUpdate " " }}} " {{{ man.vim " " allows you to access man pages via " :Man foo " runtime! ftplugin/man.vim " " }}} " " }}} " {{{ autocommands " " perform a perl -c when writing a perl buffer " au BufWritePost *.pl,*.pm !perl -c % " " occasionally I turn this on for debugging " during schema creation " "au BufWritePost *.sql !psql -Uajharrison testcheck -f % " }}} " {{{ appearance set background=dark if has("gui_running") let rgb_file = "/usr/X11R6/lib/X11/rgb.txt" set guifont=-jmk-neep-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 set columns=185 set lines=58 highlight Normal font=-jmk-neep-medium-r-normal-*-*-140-*-*-c-*-iso8859-1 guifg=White guibg=Black highlight StatusLine term=bold,reverse cterm=bold,reverse gui=bold,reverse guifg=DarkBlue guibg=fg highlight StatusLineNC term=reverse cterm=reverse gui=reverse guifg=#000055 guibg=fg highlight ErrorMsg term=standout cterm=bold,reverse gui=bold,reverse guifg=DarkRed guibg=fg highlight VertSplit term=reverse cterm=reverse gui=reverse guifg=DarkBlue guibg=fg highlight Title term=bold ctermfg=13 gui=bold guifg=Magenta highlight Visual term=reverse cterm=reverse gui=reverse guifg=DarkBlue guibg=fg highlight Cursor guibg=Blue guifg=NONE highlight Folded guibg=DarkSlateBlue guifg=snow3 highlight FoldColumn guibg=#000040 guifg=darkyellow highlight DiffAdd term=bold,reverse cterm=bold,reverse gui=bold,reverse guifg=#000055 guibg=fg highlight DiffChange guibg=Black highlight DiffText term=bold,reverse cterm=bold,reverse gui=bold,reverse guifg=Red guibg=fg highlight DiffDelete term=reverse cterm=reverse gui=reverse guifg=#444444 guibg=fg endif " }}} " "