Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of rafael (2125)

Tuesday May 21, 2002
07:16 AM

Vim perl filetype detection

[ #5115 ]
I finally managed to have a better filetype detection for Perl from vim.
Here's my new ~/.vim/filetype.vim file :

  if exists("did_load_filetypes")

  function <SID>FT_check_pod()
      if getline(nextnonblank(1)) =~ '^=head'
          setf pod

  augroup filetypedetect
      au BufNewFile,BufRead * call <SID>FT_check_pod()
      au BufNewFile,BufRead *.t setf perl
  augroup END

Additionally, to help me editing pods, I have this single line in ~/.vim/ftplugin/pod.vim :

  set tw=74
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.