Commenting out a selection in YAML

Answered

One of my very commonly used shortcuts in DataGrip is Cmd + /  for commenting/uncommenting out a selection while I work.

I'm trying to figure out if I can get this to work with YAML.  I have the JetBrains YAML plugin but that doesn't seem to have added this functionality.

Is there a way to customize this in DataGrip so that I can have the # added to the front of the line with this shortcut / Code menu command?

0
6 comments

Hello,

It works as expected in 2022.1.5 version of DataGrip. I'm able to comment lines in YAML using Command+/ shortcut.

What version of DataGrip are you using (Help | Find Action | About)?

IDE logs would be helpful, you can collect them (Help | Collect Logs and Diagnostic Data), upload to https://uploads.jetbrains.com/ and provide ID.

0

I'm likewise using 2022.1.5.  Specifically:  Build #DB-221.5787.39, built on June 6, 2022

The shortcut works fine in SQL files, but still no luck with YAML.  I checked that the YAML plugin is the latest.  The menu items for line & block comments are grayed out from the Code menu as well.

Logs are uploaded
Upload id: 2022_06_27_aHPUEoVgaBQg8Hi8rZdzwB (file: datagrip-logs-20220627-08390517351151515984873869.zip)

 

 

 

0

Thanks. Could you please share a screenshot with the full IDE window and YAML file with disabled actions for adding/removing comments?

0

Please navigate to Preferences | Editor | File Types, find YAML and add *.yml as a file name pattern. Does it help?

1

Yes, that fixed it, thank you!

0

Please sign in to leave a comment.