4

In Navicat, how do I enclose a selection in a comment?

Is there a keyboard shortcut for this action?

abg
  • 2,002
  • 7
  • 39
  • 63

3 Answers3

12

Ctrl + / - To comment a block of code

Ctrl + Shift + / - To uncomment a block of code

Fung
  • 3,508
  • 2
  • 26
  • 33
  • This doesn't work on Mac OS (Yosemite 10.10.5). I also tried `Cmd + /` and `Cmd + Shift + /` but to no avail. `Comment` and `Uncomment` exist in the `Format` menu but have no shortcut shown. Maybe there's a way to add one? – Mr. Meeseeks May 27 '16 at 12:57
  • 1
    Mac You just hit Cmd + / to comment and uncomment But it can get pretty weird sometimes because Mac. – Tanner_Gram Jan 12 '17 at 15:31
  • Is there any way to change the keys? Because in windows it didn't work :( – uzay95 Jul 19 '18 at 14:15
  • For me on windows `ctrl + /` to comment. Just highlight the commented area and do it again to uncomment – Callat Mar 27 '19 at 17:40
3

Place -- in front of the line.

Or if you want to comment a block place /* at the beginning and */ at the end of the block.

2

Navicat For Mysql shortcut keys:

Ctrl+Q - open a query window.

Ctrl+/ - notes or comment in the SQL statement.

Ctrl+Shift+/ - release notes or uncomment the Query.

Ctrl+R - run all query the SQL statement window.

Ctrl+Shift+R - run the SQL selected statement only.

Ctrl+N - open a new query window.

Ctrl+W - close current query window.

mx0
  • 6,445
  • 12
  • 49
  • 54