What are your suggestions for an ideal Vim configuration for Perl development?

后端 未结 12 1036
说谎
说谎 2021-01-29 17:56

There are a lot of threads pertaining to how to configure Vim/GVim for Perl development on PerlMonks.org. My purpose in posting this question is to try to create, as much as pos

12条回答
  •  广开言路
    2021-01-29 18:30

    For tidying, I use the following; either \t to tidy the whole file, or I select a few lines in shift+V mode and then do \t

    nnoremap  \t :%!perltidy -q
    vnoremap  \t :!perltidy -q
    

    Sometimes it's also useful to deparse code. As the above lines, either for the whole file or for a selection.

    nnoremap  \D :.!perl -MO=Deparse 2>/dev/null
    vnoremap  \D :!perl -MO=Deparse 2>/dev/null
    

提交回复
热议问题