Is there a way to define code snippets for another language, other then the default ones (C#, VB ...) in VS 2008 ? I'm using Intel's fortran compiler with Visual studio, and its integration in it is pretty complete apart from the code snippets part. I thought I read somewhere on msdn that you can't define new ones, for other languages.
So I would be really glad if someone could prove me otherwise.
Any help appreciated.
Import a code snippet You can import a snippet to your Visual Studio installation by using the Code Snippets Manager. Open it by choosing Tools > Code Snippets Manager. Click the Import button. Go to the location where you saved the code snippet in the previous procedure, select it, and click Open.
To create or edit your own snippets, select User Snippets under File > Preferences (Code > Preferences on macOS), and then select the language (by language identifier) for which the snippets should appear, or the New Global Snippets file option if they should appear for all languages.
Code Snippet support for a language is determined by the language service. The Intel Fortran package does not support code snippets and it cannot be added by anyone else (through an add-in or 3rd party package).
The registry key that governs code snippet support is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Languages\CodeExpansions. You'll notice underneath this key there are subkeys for Basic, CSharp and XML (and maybe more if you have other language services that support code snippets) but no subkey for Fortran.
The only thing you can do is make a feature request to Intel and maybe they'll add code snippet support in a few years.
Check out this article on VS and Code Snippets. It was written for VS2005 but is the same for VS2008.
Code Snippets
You should be able to use this with fortran since you specify the code language in an xml file that's used for the snippets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With