Commenting Blocks of Code in and Out
-
- 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
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.
I'm running codelite 7.0 on OS X 10.10.1 (Yosemite). Please help me out, someone.
- eranif
- CodeLite Plugin
- Posts: 6376
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Commenting Blocks of Code in and Out
Select the text you want and hit ctrl-shift-/
Hitting ctrl-/ (without the shift) will comment the selected lines with c++ comment style
Hitting ctrl-/ (without the shift) will comment the selected lines with c++ comment style
Make sure you have read the HOW TO POST thread
-
- 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
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?
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?
- eranif
- CodeLite Plugin
- Posts: 6376
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Commenting Blocks of Code in and Out
For OSX, always replace Ctrl with CMD: e.g. Ctrl-C for copy is CMD-C on OSXsaul wrote:1) Just for someone else who reads this post, on the Mac it's cmd, not ctrl, of course.
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-/)2) How do I uncomment the block, though?
Eran
Make sure you have read the HOW TO POST thread
-
- 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
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.
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.
- eranif
- CodeLite Plugin
- Posts: 6376
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Commenting Blocks of Code in and Out
What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?
Eran
Eran
Make sure you have read the HOW TO POST thread
- eranif
- CodeLite Plugin
- Posts: 6376
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Commenting Blocks of Code in and Out
What happens when you reset the default keyboard shortcuts from: settings->keyboard shortcuts->Defaults button?
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- 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
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.
sure is strange that a new install of codelite on a new win10 machine would have a bug.
thanks for the help.
-
- CodeLite Curious
- Posts: 2
- Joined: Tue Aug 19, 2025 5:47 pm
- Genuine User: Yes
- IDE Question: c++
- Contact: