Question

I would really like to use Sublime Text more for light C# coding; however, I would prefer for Sublime Text to identify .NET Classes, Methods, and Property names; and, use colors from my custom color scheme to to highlight them.

I installed "C# Compile and Run" as well as "completion"; however, they didn't make any difference. I'm hoping someone can point me to an addon that could add this enhancement.

Was it helpful?

Solution

I don't program in C#, so I can't speak from personal experience, but a quick Google search turned up the csharp-tmbundle, a language definition for TextMate that should also work for Sublime Text. Go to your Packages folder on the command line (%APPDATA%\Sublime Text X\Packages where X is either 2 or 3) and run

git clone https://github.com/wintermi/csharp-tmbundle.git C#

and you should now have a C# option in the View -> Syntax menu, as well as the syntax menu accessible via the far right option in the status bar. For determining which scopes are currently active under your cursor, I highly recommend the ScopeAlways plugin available via Package Control.

Good luck!

OTHER TIPS

You will have to extend the syntax definitions of the C# language. These are hidden inside .sublime-package files which are basicly zip files. You can use the plugin PackageResourceViewer of which one of the features is that it can extract the files and packages to the Packages directory.

Once you've installed the plugin, open the command palette and type prv to get the Package Resource Viewer options. Choose Open Resource and navigate to the C#. You then need to search for the .tmLanguage file. This will allow you to make changes to the parsing.

See: http://docs.sublimetext.info/en/latest/reference/syntaxdefs.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top