Page 1 of 1

Commenting Blocks of Code in and Out

Posted: Fri Jan 02, 2015 1:25 am
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.

Re: Commenting Blocks of Code in and Out

Posted: Fri Jan 02, 2015 1:28 am
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

Re: Commenting Blocks of Code in and Out

Posted: Fri Jan 02, 2015 2:37 am
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?

Re: Commenting Blocks of Code in and Out

Posted: Fri Jan 02, 2015 12:18 pm
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

Re: Commenting Blocks of Code in and Out

Posted: Tue May 31, 2016 12:37 pm
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.

Re: Commenting Blocks of Code in and Out

Posted: Tue May 31, 2016 3:11 pm
by eranif
What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?

Eran

Re: Commenting Blocks of Code in and Out

Posted: Tue May 31, 2016 3:11 pm
by eranif
What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?

Eran

Re: Commenting Blocks of Code in and Out

Posted: Tue May 31, 2016 4:54 pm
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.