none
.csh extension c++ association change

    Question

  • I'm currently running VS 2015 Update 3.

    I'm trying to use the TextMate support introduced in VS 2015 Update 1 to use a bundle for .csh files (with the super-handy Syntax Highlighting Pack) http://vsixgallery.com/extension/4773ce75-6f30-4269-9557-1f7c30a47be2/ 

    The problem is that VS seems hard-coded to force .csh to use the C++ editor, so it won't honor the bundle.  Is there a way to change this?

    .csh is the common extension for C-Shell, a truly outdated and painful shell language, but one I have to use for a project that includes a lot of mixed Python and C Shell code.  I use VS for VB.Net programming, and was trying to use it for Python to in order to avoid learning something else.  I'd like to be able to edit .py and .csh side by side in VS with full Intellisense for .py and just syntax highlighting for .csh.  I can do it in VS Code, but I'd rather use the full VS, since I've been working in it for years, prefer its interface, and pay for it.

    Thanks,

    Brady

    Friday, February 3, 2017 5:25 PM

Answers

  • Hi jbhurst,

    I have read the communication from you and madskristensen, that you are could not implement .csh syntax highlighting in VS2015. Because .csh file will be opened by the C++ editor. So I have helped you submitted a User Voice to the VS connect with the following link. You could vote and comment it, I think engineers from Microsoft will evaluate this suggestion seriously.

    https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17970013-please-add-csh-syntax-highlighting-in-c-editor

    And you could mark this reply that could help others, who have the same issue as yours, to vote and comment it. :)

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by qing__Moderator Thursday, February 9, 2017 5:41 AM
    • Marked as answer by jbhurst Thursday, February 9, 2017 1:41 PM
    Tuesday, February 7, 2017 2:07 AM
    Moderator

All replies

  • Hi Brady,

    Welcome to MSDN forum.

    According to your description, you issue is more related to visual studio general questions, our forum is to talk about the installation of visual studio, I will move your thread to Visual Studio Development  > 

    Visual Studio General Questions for a professional support. Thank you for understanding.

    Best regards,

    Joyce


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 6, 2017 3:06 AM
  • Hi jbhurst,

    Please refer to the above link you posted, and check supported languages and file types to make sure this plugin supports your language.

    And which type project you created.

    >>I'd like to be able to edit .py and .csh side by side in VS with full Intellisense for .py and just syntax highlighting for .csh.

    VS2015 support the Intellisense for Python language. And if you have some problems for syntax highlighting for .csh in VS2015, I suggest you had better make a comment to the above link.

    In my side, I have created Python project and add a .csh file, I get the following screenshot:

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 6, 2017 8:53 AM
    Moderator
  • Oscar, I don't think the highlighting for the .csh file in your example is coming from a TextMate bundle or is appropriate for .csh.  For example, class is not a reserved word in C Shell.  C-Shell is not supported out of the box in VisualStudio, but should be with the TextMate support added in update 1.  The Microsoft developed bundle "Syntax Highlighting Pack" supports .csh as a TCL variant in its most recent version, and I've also tried adding my own bundle as well as other third party bundles.  The problem is that any bundle that references the .csh extension is overridden by something in VS and ignored.

    In the below screenshot, you can see the example at the left with # comments being honored and the one next to it with them being ignored.  The Tcl.plist file comes from "\Users\uname\.vs\Extensions\tcl\Syntaxes\Tcl.plist" and has entries for both .post and .csh extensions.  The same file named .post at the left works, but when named .csh does not.  I'm looking for a way to override VS' default handling of .csh files which I would think should be controllable somewhere by a setting, registry entry, or config file.  I've never come across someone that uses the .csh extension for c or c++, but it is pretty standard for C Shell.

    For reference, here is the extension I am using with the included csh support: http://vsixgallery.com/extension/4773ce75-6f30-4269-9557-1f7c30a47be2/

    And here is the discussion around .csh being grabbed by VS.  

    https://github.com/madskristensen/TextmateBundleInstaller/issues/180

    I'm hoping a VS expert can figure out what is driving the override and if it can be changed now or in a future patch.  I realize the number of people wanting to use VS for .csh editing is trivial, but more generally as VS moves to be used for more languages, I think it should have flexibility with all of its file extensions.



    • Edited by jbhurst Monday, February 6, 2017 2:45 PM
    Monday, February 6, 2017 2:34 PM
  • Hi jbhurst,

    I have read the communication from you and madskristensen, that you are could not implement .csh syntax highlighting in VS2015. Because .csh file will be opened by the C++ editor. So I have helped you submitted a User Voice to the VS connect with the following link. You could vote and comment it, I think engineers from Microsoft will evaluate this suggestion seriously.

    https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/17970013-please-add-csh-syntax-highlighting-in-c-editor

    And you could mark this reply that could help others, who have the same issue as yours, to vote and comment it. :)

    Sincerely,

    Oscar


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by qing__Moderator Thursday, February 9, 2017 5:41 AM
    • Marked as answer by jbhurst Thursday, February 9, 2017 1:41 PM
    Tuesday, February 7, 2017 2:07 AM
    Moderator