" I don't want to become awkward when editing on another machine, " so I stick to as few and as highly effective settings as possible. set nocompatible " we want vim, not vi set ruler " display current position in file set backspace=2 " BS and Del in insert mode allowed and go through EOLs set number " line numbers set scrolloff=3 set autoindent set noerrorbells if has("gui_running") set guioptions-=f " fork+detach console set guioptions-=t " no menu tear-off colorscheme peachpuff else set background=dark " my console has black bg endif filetype plugin indent on syntax on " Current directory follows the file being edited autocmd BufEnter * lcd %:p:h " [F4] for quick :make noremap :make " [F5] toggles error window noremap :cope autocmd BufReadPost quickfix noremap :ccl:noremap F5> ESC>:copeC-M>:echo ":ccl" " [Ctrl-PgUp/Dn] to flip through :make errors noremap :cp noremap :cn inoremap :cpi inoremap :cni " save keystrokes on the Perl shebang iabbrev #!p #!/usr/bin/perl -wuse strict;:filetype detecti #### " Vim filetype plugin file " Language: Perl " Maintainer: Dan Sharp " Last Change: Sun, 19 May 2002 02:07:22 Central European Standard Time " Changed By: Aristotle Pagaltzis if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 " Set 'formatoptions' to break comment lines but not other lines, " and insert the comment leader when hitting or using "o". setlocal fo-=t fo+=croql setlocal comments=:# " Make sure the continuation lines below do not cause problems in " compatibility mode. set cpo-=C " Change the browse dialog on Win32 to show mainly Perl-related files if has("gui_win32") && !exists("b:browsefilter") let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" . \ "Perl Modules (*.pm)\t*.pm\n" . \ "Perl Documentation Files (*.pod)\t*.pod\n" . \ "All Files (*.*)\t*.*\n" endif " Provided by Ned Konz "--------------------------------------------- setlocal include=\\<\\(use\|require\\)\\s* setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','') setlocal isfname=A-Z,a-z,:,48-57,_ setlocal isident=48-57,_,A-Z,a-z setlocal iskeyword=48-57,_,A-Z,a-z,: setlocal define=[^A-Za-z_] " Set this once, globally. if !exists("perlpath") if &shellxquote != '"' let perlpath = system('perl -e "print join(q/,/,@INC)"') else let perlpath = system("perl -e 'print join(q/,/,@INC)'") endif let perlpath = substitute(perlpath,',.$',',,','') endif let &l:path=perlpath setlocal keywordprg=perldoc setlocal makeprg=perl\ -Mstrict\ -wc\ % setlocal errorformat+=%m\ at\ %f\ line\ %l. setlocal grepprg=rgrep\ -n\ -R\ '*.p[ml]'\ $* map :exec ":tag /".expand("")