Page 1 of 1

Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 5:58 am
by Allanon
How can I uncomment a line in codelite? I cannot find a keyboard shortcut or menu item for this.

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 9:44 am
by eranif
Ctrl-/

Or Ctrl-shift-/ to comment a selection

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


Eran

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 10:57 am
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

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 11:35 am
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

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 11:49 am
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.

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 11:59 am
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.

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 12:08 pm
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

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 12:37 pm
by solewalker
Please open a feature request for this
Just did it.

Re: Uncomment keyboard shortcut

Posted: Sat Sep 07, 2013 7:38 pm
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.