📜 ⬆️ ⬇️

Perl-support plugin for vim

Plug-in installation


mkdir ~/.vim cd ~/.vim curl http://www.vim.org/scripts/download_script.php?src_id=21048 -o perl-support.zip unzip perl-support.zip rm perl-support.zip echo "filetype plugin on" >> ~/.vimrc yum install perl-Perl-Critic perltidy 


Creating a new file




If the file has the extension .pl or .pm, the file is created with a header for documentation.
The same plugin prescribes use strict, use warnings, use utf8.
Customize for yourself - is not difficult.

Running a pearl script without leaving the vim editor


Command \ rr


Move the cursor to an empty field and type \ rr (in any mode except text input).
Our program will be executed.
')

Restore order using perl tidy without leaving the editor


\ Ry command


We bring the code to a beautiful and canonical form with one team.

Criticize with Perl-Critic "without leaving the checkout"


\ Rpc command


After entering the \ rpc - pearl critic tells us how he got to the bottom.
And it gives you the page number of a book in the Perl Best Practices book , which you must read to understand how to fix it (if there is a need).

More commands (hotkeys) of the plugin




Additionally


English-language article about the plugin perl-support
The plugin page on the official site vim.org

The author of this plugin is Fritz Mehner.
He wrote the same way:

Source: https://habr.com/ru/post/208492/


All Articles