| Author |  Topic  |  | 
              
                | quagfengNew Member
 
  
 
                Germany5 Posts
 | 
                    
                      |  Posted - Oct 08 2024 :  2:42:12 PM     
 |  
                      | 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?
 
 
 |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Oct 09 2024 :  09:44:30 AM     
 |  
                      | 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
 |  
                      |  |  | 
              
                | quagfengNew Member
 
  
 
                Germany5 Posts
 | 
                    
                      |  Posted - Oct 09 2024 :  3:16:44 PM     
 |  
                      | 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.
 |  
                      |  |  | 
              
                | felineWhole Tomato Software
 
      
 
                United Kingdom19247 Posts
 | 
                    
                      |  Posted - Oct 10 2024 :  06:53:29 AM     
 |  
                      | 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
 |  
                      |  |  | 
              
                |  |  Topic  |  |