I'm writing in C# the next generation of an old app originally written in Delphi. I often have to look in the old code and wondered if there's anyway to install Pascal syntax highlighting in the Visual Studio 2008 editor.
TIA.
I'm not an expert but you might want to look at Delphi Prism which seems to combine a Delphi compiler into Visual Studio. It might be overkill however.
http://blog.cumps.be/visual-studio-2008-and-php-coloring/ - maybe this could be adjusted from PHP for delphi/pascal
Planned project:
http://www.codeplex.com/Delphi4VisualStudio - this (one day) will support syntax highlighting (but it seems to be overkill too)
I know the guy working on Delphi4VisualStudio. The project doesn't seem to be active any more, but I know he had syntax highlighting working in the editor. You could always ask him for just that piece.
I could do it in about 1-2 day's work, but I'm busy trying to make ends meet (seriously). Let me know if you want me to do it.
Prior work (showing [almost] only the syntax highlighting):
Edit: Don't mark me down if this isn't allowed - just let me know. I'd seriously do it for free if I had any spare time at all, I just don't right now.
UnrealScript
INI Files
ANTLR grammars
StringTemplate templating language
Chapel
Related
I'm writing an add-in for both VS2008 and VS2010 and I'd like to have graphical enhancements that appear on top of the code (similar to Resharper/CodeRush). Doing so in VS2010 is relatively easy using adornments, however, how do I do it in VS2008? Anyone knows a good resource/article for something in that spirit?
I know that DXCore (CodeRush) allows one to do it, however, due to license restriction (I can't bundle DXCore with my addin) I am unable to do so.
Thank you
I've ended up implementing it by myself.
The general idea is to make a transparent form (Winforms or WPF), put the adornment you want in that form, and then overlay the form at the position of the code.
Since the editor was completely rewritten between 2008 and 2010 the technique for this is going to be totally different and it seems unlikely that now, 6 months after 2010 has launched, is a good time to start writing something for 2008, especially something difficult.
That said, a great source of sample code for editor extensions is http://code.msdn.microsoft.com/vsx. This is from the VSX team and has been very helpful to me while working on extensions.
We've got this large application written in Delphi 5, and development is ongoing to this day. There is research going on into migrating to newer versions, but so far there is no success, as some 3rd party components have not been updated in ages and do not work on later versions.
In the meantime however people need to continue work on it. Now Delphi 5 IDE is no real treat. It's pretty bug-ridden and lacks a lot of features of contemporary IDEs which makes it difficult to use. Especially when it comes to debugging.
So I was wondering - would it be possible to use Visual Studio in the process? As far as I know the .PDB file format is pretty old and is well documented. Could it be possible to make the Delphi compiler to somehow generate a .PDB files for it's compiled results? Then the program could be debugged with Visual Studio, possibly to a much greater extent than in the original IDE.
Well, the absolute Holy Grail would be to move all development to VS, just keeping the compiler from Delphi, but I imagine that would be pretty impossible.
No, and neither can any other version of Delphi. You can use Map2Dgb to turn a detailed map file into a dbg file, though, and you can use that in WinDbg.
I'm curious what debugging features you're expecting to use in Visual Studio that aren't in Delphi 5 and that also don't rely on the IDE understanding the Delphi language. I was always rather pleased with Delphi 5.
BTW, you can vote for this feature here.
Note, that VS-compatitible debug info will be useful not only for debugging application (I agree: it's better to use Delphi), but it will be useful for using tools like Process Explorer. For example, Process Explorer may be able to show human-readable call stack, instead of RAW numbers.
I've tried tds2pdb and it works great for me.
Apparently you can't. Seems that PDB is after all a propieritary Microsoft format without documentation, and as such there are no other tools generating it. Pity. :(
I would recommend moving to a later version of Delphi. We have done this with various applications for clients. Moving to a newer version of Delphi is normally straightforward, but there were issues moving from D5 to D6 due to changes in the way components were handled (design time code being separated from run time) and the change to Unicode in D2009 was a bigger change.
The main thing is to sort out the third party components. We only ever use third party components that come with source so if the worst happens and the vendor disappears, we can still work on the components ourselves.
Which components are causing the issues?
I'm digging F# and enjoying writing code in massively different ways.
But I'm confused - why the non #light syntax exists if it is superior to the default syntax?
Does anyone know why?
Why not make #light default and allow a #dark option for those wanted whitespace inspecific code?
It is the default in the latest CTP release and will be when it is in the box for Visual Studio 2010.
While most developers agree with you that #light is a more pleasant coding experience, not everyone shares your love. Moreover, having whitespace aware code also makes some tasks such as code generation MUCH more difficult. (Think lambdas inside of lambdas.)
I suspect the non-#light won't be discussed or seen in the wild, but will certainly exist for people who come from a heavy OCaml background or have some religious issues with #light.
The non-light syntax exist for OCaml compatability. F# takes some code for libraries directly from OCaml and also is supposed to be compatible with OCaml. If you want to port code you just use non-light. As stated in the previous answer #light will be the default in the final release.
Just in case you missed that, you can find some more thoughts about the #light syntax in another post here on StackOverflow. It explains some reasons why non-#light syntax may be interesting.
I mention that i am designing a language. The plan was always to not implement it but to design it but i am considering implementing it if i think i could do it in a reasonable amount of time.
How would i have my language use intellisense in visual studios? BooLangStudio has it http://www.codinginstinct.com/2008/05/boo-in-visual-studio.html, http://www.codeplex.com/BooLangStudio
It all depends on how much time you want to spend on it. I have about 2,000 hours of work in my Visual Studio IntelliSense projects resulting in exactly one mostly-complete language service. That said, it's not your "average" IntelliSense extension to Visual Studio - see the feature set for more info.
Here are some good resources to look at. I have a tendency to write with an assumption that users are already familiar with both the Visual Studio Extensibility basics and parsing with ANTLR. If you aren't, you should probably start at www.antlr.org and with my "ANTLR port" of one of the simple Visual Studio language service tutorials.
Here are some posts showing how serious I am about the subject. :D
How does code completion work?
Smart code-completion original and revisited. Clearly I take the latter more seriously than other people (voted down and voted to close?!), but I believe doing so just gives my users a better product. :)
High-speed incremental lexing for syntax highlighting original (under IScanner-friendly lexers), cleaned up (significantly - vastly preferable to the original), and made yet again 6x faster in 1/4 the memory.
Little things like sane commenting/uncommenting and brace matching do make a difference. On a side note, once you use one that's well-behaved, the others (including the ones for some Microsoft languages in Visual Studio) are rather annoying.
If you can, read all the IntelliSense-related posts on my blog.
Smart indent is a PITA (I mean really smart, e.g. the C# language service in VS2008). I have a love/hate relationship with it. I'm annoyed now because writing this bullet made me think about it. Argh. My insight here makes me a bit forgiving of them breaking it for VS2010 Beta 1, but it doesn't keep me from missing its awesomeness.
PS: I can now build a syntax highlighter for a new language commenting/uncommenting in 1 day. In the same day I'm ofter able to get the type & member bars in as well.
This is a good place to look for Visual Studio Extensibility.
Also, here. But, the first link has a video specific to adding Intellisense to your language service.
As of 4-4-2017: This article seems to give all of the basics for creating a language extension, which includes highlighting words and providing intellisense (code completion).
https://code.visualstudio.com/docs/extensions/example-language-server
My company gave me VS2008 for web development in C#/ASP.NET. I do a lot of Perl programming too and I'd like to start using VS for that so I can have a consistent work environment... but am having real trouble figuring out how to do so.
VS has a lot of nice features but seems pretty hostile towards languages it doesn't support out of the box. Is it really or do I just not "get" the VS way of doing things?
I usually write Perl scripts using TextPad and the features I'm used to having are pretty basic.
line numbering
soft line wrapping
syntax highlighting
auto-indenting in/out after open/close brace
auto-indenting to the same starting point as the previous line
brace matching
run scripts from within the editor
capture script output in an editor pane
dbl-click on error message jumps to the line where the error occurred
How do I at least get the above features in VS2008?
How can I get advanced features like:
code folding
intellisense
code-completion
integrated perldoc
VS-style debugging and code tracing
on-the-fly error detection
etc
(I see one possibly relevant online discussion in an ASPN mod-perl mailing list , but don't understand what, if anything, it means to a guy like me.)
-- added --
I'm aware of other editors and IDEs out there: vi, perlmode-emacs, Komodo, E, TextMate, etc. This question is not about what other editor or IDE I should try.
While I appreciate your suggestions, I'd rather read them in a thread like "What editor should I use for Perl" and not "How do I set up VS to accomplish my goal"
-- added --
After doing some additional research I've concluded that you just can't get there from here. The only option would be to write my own language plugin. Considering the time commitment to make something usable I think I'm just better off using a different editor. Thanks anyway guys
I use VS2008 for .NET stuff, but I'm completely sold on Komodo for Perl editing. The full Komodo IDE is worth the money if this is your job and like/need to use a debugger, but even the free Komodo Edit is a terrific Perl editor.
I agree, I really like Komodo as well for an IDE. Its solid and easy to use. I tend to use Vim a lot instead of an IDE, but that's just personal preference.
Check out Komodo though, its worth the look.
Regards,
Jeff
I heard rumors of there being a .NET implementation of Perl, called IronPerl, but except for that, I don't think there is any sort of plugin for Visual Studio. I would suggest just using one of the many tools out there that are designed for Perl.
There was something called "Visual Perl" wich worked with Visual Studio.net 2002 and was needed Perl Dev kit tool, but I don't how comatible is with VS.net 2010.
Looks like you can do this via the Managed Package Framework if you are willing to put the time in.
You can decrease the amount of work required by just setting up syntax coloring