简体   繁体   中英

Is there a Perl extension for Visual Studio?

Does anyone know if there is an extension or plugin for Visual Studio ( any version ) that will recognize Perl syntax highlighting? I want to edit the Perl files in my vs projects, but it gets hard to read sometimes. Thanks.

Old Answer (still applies unless you are using Visual Studio Update 1 RTM (2015) or later)

In short. No, there doesn't seem to be a good plugin for it.

If you use Perl rarely, I would recommend sticking with Visual Studio for Microsoft languages and Padre for Perl.

However, if you use Perl as much or more than Microsoft languages, you might want to check out Emacs , which has support for C# , VB.NET , and Perl. Emacs is designed to be a "one-stop-shop" for all you do all day long, including browsing the web. You can come into work, start using Emacs and never have to leave it until it is time to go home.

disclaimer: The answer above is geared toward the Original Poster. I'm a big fan of vim . Personally, if I were thrust into a situation where I had to work with C# and Perl on the same project, I would get ViEMU for Visual Studio and then use two editors: Visual Studio for C# and vim for Perl.


If this is something you are willing to spend some time on, check out defining your own syntax highlighting for Visual Studio.

Visual Studio Update 1 RTM now (2015) 支持 Perl,以及 Go、Java、R、Ruby 和 Swift。

Komodo Edit is quite nice, and free. code folding and other good stuff.

A work-in-progress Visual Studio extension for Perl6 (not the Perl5 asked by the OP) is incrementally more full-featured. It is released under the MIT License and its repository is on GitHub. As a prerequisite, Perl6 (eg, Rakudo ) needs to already be installed.

For Perl syntax highlight ext install perl6

Install this extension To Run Perl and Other languages

A workaround for Visual Studio desktop version is to use C++ syntax highlighting.

  • Go to Options -> Text Editor -> File Extension
  • Enter extension "pl" (no dot)
  • Assign it to "Microsoft Visual C++"
  • Click "Add"

If necessary, repeat the same steps for "cgi" extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM