home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / ftplugin / perl.vim < prev    next >
Encoding:
Text File  |  2003-05-02  |  1.5 KB  |  51 lines

  1. " Vim filetype plugin file
  2. " Language:    Perl
  3. " Maintainer:    Dan Sharp <dwsharp at hotmail dot com>
  4. " Last Change:  2003 May 02
  5. " URL:        http://mywebpage.netscape.com/sharppeople/vim/ftplugin
  6.  
  7. if exists("b:did_ftplugin") | finish | endif
  8. let b:did_ftplugin = 1
  9.  
  10. setlocal formatoptions+=crq
  11.  
  12. setlocal comments=:#
  13. setlocal commentstring=#%s
  14.  
  15. " Make sure the continuation lines below do not cause problems in
  16. " compatibility mode.
  17. set cpo-=C
  18.  
  19. " Change the browse dialog on Win32 to show mainly Perl-related files
  20. if has("gui_win32") && !exists("b:browsefilter")
  21.     let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
  22.                \ "Perl Modules (*.pm)\t*.pm\n" .
  23.                \ "Perl Documentation Files (*.pod)\t*.pod\n" .
  24.                \ "All Files (*.*)\t*.*\n"
  25. endif
  26.  
  27. " Provided by Ned Konz <ned@bike-nomad.com>
  28. "---------------------------------------------
  29. setlocal include=\\<\\(use\|require\\)\\>
  30. setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
  31. setlocal iskeyword=48-57,_,A-Z,a-z,:
  32. setlocal define=[^A-Za-z_]
  33.  
  34. " Set this once, globally.
  35. if !exists("perlpath")
  36.     if executable("perl")
  37.     if &shellxquote != '"'
  38.         let perlpath = system('perl -e "print join(q/,/,@INC)"')
  39.     else
  40.         let perlpath = system("perl -e 'print join(q/,/,@INC)'")
  41.     endif
  42.     let perlpath = substitute(perlpath,',.$',',,','')
  43.     else
  44.     " If we can't call perl to get its path, just default to using the
  45.     " current directory and the directory of the current file.
  46.     let perlpath = ".,,"
  47.     endif
  48. endif
  49.  
  50. let &l:path=perlpath
  51.