title: What are your suggestions for an ideal Vim configuration for Perl development?
body: <p>There are a lot of threads pertaining to how to configure <a href="http://www.vim.org/" rel="nofollow noreferrer">Vim/GVim</a> for Perl development <a href="http://www.google.com/search?q=vimrc+site%3Aperlmonks.org" rel="nofollow noreferrer">on PerlMonks.org</a>. My purpose in posting this question is to try to create, as much as possible, an ideal configuration for Perl development using Vim/GVim. Please post your suggestions for <code>.vimrc</code> settings as well as useful plugins.</p>
  
  <p>I will try to merge the recommendations into a set of <code>.vimrc</code> settings and to a list of recommended plugins, ftplugins and syntax files.</p>
  
  <h3>.vimrc settings</h3>
  
  <pre><code>"Create a command :Tidy to invoke perltidy"
  "By default it operates on the whole file, but you can give it a"
  "range or visual range as well if you know what you're doing."
  command -range=% -nargs=* Tidy &lt;line1&gt;,&lt;line2&gt;!
      \perltidy -your -preferred -default -options &lt;args&gt;
  
  vmap &lt;tab&gt; &gt;gv    "make tab in v mode indent code"
  vmap &lt;s-tab&gt; &lt;gv
  
  nmap &lt;tab&gt; I&lt;tab&gt;&lt;esc&gt; "make tab in normal mode indent code"
  nmap &lt;s-tab&gt; ^i&lt;bs&gt;&lt;esc&gt;
  
  let perl_include_pod   = 1    "include pod.vim syntax file with perl.vim"
  let perl_extended_vars = 1    "highlight complex expressions such as @{[$x, $y]}"
  let perl_sync_dist     = 250  "use more context for highlighting"
  
  set nocompatible "Use Vim defaults"
  set backspace=2  "Allow backspacing over everything in insert mode"
  
  set autoindent   "Always set auto-indenting on"
  set expandtab    "Insert spaces instead of tabs in insert mode. Use spaces for indents"
  set tabstop=4    "Number of spaces that a &lt;Tab&gt; in the file counts for"
  set shiftwidth=4 "Number of spaces to use for each step of (auto)indent"
  
  set showmatch    "When a bracket is inserted, briefly jump to the matching one"
  </code></pre>
  
  <h3>syntax</h3>
  
  <ul>
  <li><a href="https://github.com/vim-perl/vim-perl" rel="nofollow noreferrer">vim-perl: Support for Perl 5 and Perl 6 in Vim</a></li>
  </ul>
  
  <h3>plugins</h3>
  
  <ul>
  <li><p><a href="http://github.com/Raimondi/delimitMate" rel="nofollow noreferrer">delimitMate provides auto-completion for quotes, parens, brackets, etc. in insert mode</a>. It handles apostrophes more intelligently than <a href="http://www.vim.org/scripts/script.php?script_id=2373" rel="nofollow noreferrer">closepairs.vim</a> does.</p></li>
  <li><p><a href="http://www.vim.org/scripts/script.php?script_id=1913" rel="nofollow noreferrer">perlhelp.vim: Interface to perldoc</a></p></li>
  <li><p><a href="http://www.vim.org/scripts/script.php?script_id=273" rel="nofollow noreferrer">taglist.vim: Source code browser</a></p></li>
  </ul>
  
  <h3>ftplugins</h3>
  
  <ul>
  <li><a href="http://www.vim.org/scripts/script.php?script_id=209" rel="nofollow noreferrer">perldoc.vim: perldoc command from vim</a></li>
  </ul>
  
  <h3>CPAN modules</h3>
  
  <ul>
  <li><a href="https://metacpan.org/pod/Vim::X" rel="nofollow noreferrer">Vim::X</a></li>
  </ul>
  
  <h3>Debugging tools</h3>
  
  <p>I just found out about <a href="http://vim.sourceforge.net/scripts/script.php?script_id=663" rel="nofollow noreferrer">VimDebug</a>. I have not yet been able to install it on Windows, but looks promising from the description.</p>