Home Download Buy Blog Forum Support

Toggle comment not working for C# source files

Toggle comment not working for C# source files

Postby dismas on Wed Feb 29, 2012 12:00 am

I'm using Sublime Text 2181 on Windows 64-bit and neither toggle comment nor toggle block comment works for C# files (extension .cs). Nothing happens when I select toggle comment from the edit menu, and the keyboard shortcuts don't work either. It works fine for C++ and XML miles. How can I fix this?
dismas
 
Posts: 1
Joined: Tue Feb 28, 2012 11:55 pm

Re: Toggle comment not working for C# source files

Postby waspswarm on Wed Oct 30, 2013 9:46 pm

I have Sublime Text 2 version 2.0.2 build 2223 and found that toggle comment did not work either from the menu selection or the keyboard shortcut for command-/.

So I copied the C++ comments tmPreferences file:
~/Library/Application\ Support/Sublime\ Text\ 2/Packages/C++/Comments\ \(C++\).tmPreferences

into

~/Library/Application\ Support/Sublime\ Text\ 2/Packages/C\#/Comments\ \(C\#\).tmPreferences

And then edited the scope <key> to replace source.c, source.c++, source.objc, source.objc++ with source.cs.

I'm not sure if this is the preferred or recommended approach as I just started using Sublime Text 2 yesterday.

Cheers,
scott
waspswarm
 
Posts: 1
Joined: Wed Oct 30, 2013 7:49 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 31 guests