3

Kdevelop has separate commands for commenting (ctrl+d) and uncommenting (ctrl+shift+d).

Is there a way of using a single shortcut to toggle both?

4

2 回答 2

3

In my version of kdevelop / kate (v. 4.6.0 / 3.13.3 using KDE 4.13.3, from Ubuntu 14.04) there are two different entries in Settings / Configure Shortcuts... and they are both located under Kate Part grouping:

  • The first one is spelled 'Toggle comment' and always tries to use the HTML/XML style comments <!-- -->;
  • The second one, spelled 'Toggle Comment' has a context specific behavior, and it is probably what you would like to assign the shortcut to.

Maybe it would be a good idea to request some developers to assign it by default to Ctrl + /, which is somewhat the most used one to the best of my knowledge.

于 2015-10-01T11:52:35.010 回答
1

Yes. Use Settings->Configure Shortcuts and enter comment in the search box.

You will see a line Toggle Comment, which you can assign a keyboard shortcut.

In this same list of results you'll see Comment and Uncomment which you may like to unassign bindings from.

于 2013-03-30T15:04:35.703 回答