Commenting Blocks of Code in and Out

CodeLite installation/troubleshooting forum
saul
CodeLite Curious
Posts: 6
Joined: Fri Dec 26, 2014 3:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

Commenting Blocks of Code in and Out

Post by saul »

I'm sorry if I'm being stupid, but I've been searching for how to comment blocks of code in and out in the editor for some time, and I just can't find it.
I'm running codelite 7.0 on OS X 10.10.1 (Yosemite). Please help me out, someone.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Commenting Blocks of Code in and Out

Post by eranif »

Select the text you want and hit ctrl-shift-/
Hitting ctrl-/ (without the shift) will comment the selected lines with c++ comment style
Make sure you have read the HOW TO POST thread
saul
CodeLite Curious
Posts: 6
Joined: Fri Dec 26, 2014 3:33 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Commenting Blocks of Code in and Out

Post by saul »

Thanks. I really appreciate your prompt responses.
1) Just for someone else who reads this post, on the Mac it's cmd, not ctrl, of course.
2) How do I uncomment the block, though?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Commenting Blocks of Code in and Out

Post by eranif »

saul wrote:1) Just for someone else who reads this post, on the Mac it's cmd, not ctrl, of course.
For OSX, always replace Ctrl with CMD: e.g. Ctrl-C for copy is CMD-C on OSX
2) How do I uncomment the block, though?
For C style comment, there is no keyboard shortcut for doing this. For single line comment ("//") select the block and hit the same key combination (CMD-/)

Eran
Make sure you have read the HOW TO POST thread
howiek03
CodeLite Curious
Posts: 2
Joined: Tue May 31, 2016 12:14 pm
Genuine User: Yes
IDE Question: php
Contact:

Re: Commenting Blocks of Code in and Out

Post by howiek03 »

Hi,

I am on Windows 10 and when I try either method of keyboard shortcut ctrl-/ or the navbar edit > comment > comment line, nothing happens. I have also tried changing the keyboard shortcut for commenting the line, but the various combinations I tried still wouldnt set a comment tag.

Deleting a line using ctrl-L and via the navbar both work, so this might be a failure isolated to commenting.

Please advise.

Thanks.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Commenting Blocks of Code in and Out

Post by eranif »

What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?

Eran
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Commenting Blocks of Code in and Out

Post by eranif »

What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?

Eran
Make sure you have read the HOW TO POST thread
howiek03
CodeLite Curious
Posts: 2
Joined: Tue May 31, 2016 12:14 pm
Genuine User: Yes
IDE Question: php
Contact:

Re: Commenting Blocks of Code in and Out

Post by howiek03 »

all commenting functionality works after clicking the defaults button.

sure is strange that a new install of codelite on a new win10 machine would have a bug.

thanks for the help.
Post Reply