Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA disables key binding for commenting for hlsl
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

quagfeng
New Member

Germany
5 Posts

Posted - Oct 08 2024 :  2:42:12 PM  Show Profile  Reply with Quote
Hello, I cannot comment out code with Ctrl+k, Ctrl+c for hlsl file in Visual Studio. When I am trying to do so, I get this warning from Visual Studio:
The key combination(Ctrl+K, Ctrl+C)is bound to command(Comment Selection) which is not currently available.
Disabling visual assist makes the key binding Ctrl+k, Ctrl+c work again.
I am using visual studio 2022 community version, VA built 2024.09.30.

Does anyone know how to solve this problem?

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 09 2024 :  09:44:30 AM  Show Profile  Reply with Quote
Have you tried selecting the code to comment, and then pressing either / or * to comment or uncomment with // or /* */

This is working for me, and is using VA's comment / uncomment code command.

For the IDE command not working in HLSL files with VA enabled, this is currently a known bug:

case=149601

zen is the art of being at one with the two'ness
Go to Top of Page

quagfeng
New Member

Germany
5 Posts

Posted - Oct 09 2024 :  3:16:44 PM  Show Profile  Reply with Quote
Hi feline, thx for your tip! but isn't pressing either / or * after selecting the code to comment will just replace the code with / or *?
Also I am using vsvim, so this isn't an option for me. Hopefully this bug can be fixed soon.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 10 2024 :  06:53:29 AM  Show Profile  Reply with Quote
So long as vsvim is in edit / insert mode, and you can select the code, then / or * should "just work", since vsvim should be passing this through as an editing command, not treating it as a command mode command and reacting to its self. This depends on the VA setting:

VA Options -> Editor -> Surround Selection via character toggles

which has separate settings for the character

/ * ( { #

along with a setting to enable this for VA snippets, where you can create your own snippet to surround selected text on a single key press. More than this both / and * will command and uncomment, depending on what is selected.

https://www.wholetomato.com/en/documentation/coding-assistance/surround-selection

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000