33

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.

8
  • 14
    @Ether - Eclipse brings any PC without gazillion jigabytes of RAM to its knees. vim is totally un-usable to people from non-vi background from what I experienced. Komodo IDE is not free, I think. Padre is probably less polished (just a dumb assumption based on the fact that AFAIK it's still in development - I never used it so it's a fact-less guess and I apologize in advance if it is not the case - I do feel nothing but respect for Padre's author). Plus, NONE OF THEM can be used to work on VS projects :)
    – DVK
    Sep 21, 2010 at 2:40
  • 1
    @DVK: Visual Studio, EPIC, Komodo, VIM, and even EMACS are also "in development". ;) But for the most part, yeah.
    – Robert P
    Sep 22, 2010 at 18:41
  • 2
    @DVK Padre is a very good editor for Perl. vim is the only reason I'm not using it right now. Sep 23, 2010 at 21:18
  • @molecules - the question is, is VS an inferior IDE for the languages it works with (e.g. C#/C++) compared to Padre for Perl, as Ether seems to imply? I doubt.
    – DVK
    Sep 24, 2010 at 11:15
  • 1
    Alas, Visual Perl was discontinued in 2005
    – Matt K
    Sep 24, 2010 at 16:08

6 Answers 6

14

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.

1
13

Visual Studio Update 1 RTM now (2015) has Perl support, along with Go, Java, R, Ruby, and Swift.

1
6

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

0
2

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 (e.g., Rakudo) needs to already be installed.

1
  • Note, this applies only to Visual Studio Code. Jul 28, 2020 at 23:51
0

For Perl syntax highlight ext install perl6

Install this extension To Run Perl and Other languages

1
  • 2
    Caveat. Your link looks to be useful for "visual studio code" and not necessarily for the desktop versions of visual studio. Oct 7, 2016 at 16:44
0

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.

2
  • This answer can be used as a workaround but I want to add clear instructions Go to File -> Preferences -> Settings -> Text Editor -> Files. In Files options you will find Associations where you can add Item and value For example if we want to treat all .mc files as perl files you will add Item -> *.mc value -> perl Feb 21, 2023 at 3:43
  • @HemanthVatti To clarify, your instruction is valid for "Visual Studio Code", my post was about "Visual Studio Desktop". These are very different programs. Feb 22, 2023 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.