Uncomment keyboard shortcut

CodeLite installation/troubleshooting forum
Allanon
CodeLite Curious
Posts: 2
Joined: Sat Sep 07, 2013 5:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Uncomment keyboard shortcut

Post by Allanon »

How can I uncomment a line in codelite? I cannot find a keyboard shortcut or menu item for this.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by eranif »

Ctrl-/

Or Ctrl-shift-/ to comment a selection

You can search all keyboard shortcuts from: settings -> keyboard shortcuts


Eran
Make sure you have read the HOW TO POST thread
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by solewalker »

One thing to note that codelite uncomment method is very basic, so it works when '//' is in the beginning of the line and there is no space before it like this

Code: Select all

//....printf("Hello world\n");
In any other cases it does not work, pressing Ctrl-/ does nothing in the following cases

Code: Select all

.//...printf("Hello world\n");  
or

Code: Select all

....//printf("Hello world\n");  
It would be really cool if codelite could detect comment in those cases
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by eranif »

solewalker wrote:n any other cases it does not work, pressing Ctrl-/ does nothing in the following cases
CODE: SELECT ALL
.//...printf("Hello world\n"); 
or
I am not sure what the dots are (space?)
Anyways, works perfectly here.

Also, please mention your codelite version + OS you are using

Eran
Make sure you have read the HOW TO POST thread
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by solewalker »

Oh, yes, dots are spaces. I am using codelite 5.3 on windows 7 64bit but I compiled it back when 5.2 was released. I am now getting latest from git and see what happens.
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by solewalker »

I just got the latest from git, the result is same, Ctrl-/ does not uncomment line that has one or more spaces before '//' or '//' is followed by one or more spaces.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by eranif »

solewalker wrote:I just got the latest from git, the result is same, Ctrl-/ does not uncomment line that has one or more spaces before '//' or '//' is followed by one or more spaces.
Ok, I missed read it...
I don't think there is an "un-comment" functionality
Please open a feature request for this

Eran
Make sure you have read the HOW TO POST thread
solewalker
CodeLite Veteran
Posts: 75
Joined: Thu Mar 14, 2013 11:24 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by solewalker »

Please open a feature request for this
Just did it.
Allanon
CodeLite Curious
Posts: 2
Joined: Sat Sep 07, 2013 5:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Uncomment keyboard shortcut

Post by Allanon »

eranif wrote:Ctrl-/

Or Ctrl-shift-/ to comment a selection

You can search all keyboard shortcuts from: settings -> keyboard shortcuts
Yes, this makes the line into a comment. But how do I remove that comment? Pressing the same keyboard shortcut results in additional comment symbols added to the beginning of the line.
Post Reply