Home » Community » Newbie corner » Block comment key short cut
Block comment key short cut [message #31581] |
Wed, 16 March 2011 13:10  |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
I just discovered that I could jump to a #incluide file by CTRL+ LEFT MOUSE CLICK on the #include file name.
So I figure that as a most commonly used function, block comment may as well have being implemented. If it's true, how?
And please share some other little tricks with the IDE that may help to save time and increase productivity.
Thank you for your tips.
|
|
|
Re: Block comment key short cut [message #31582 is a reply to message #31581] |
Wed, 16 March 2011 13:26   |
|
Lance wrote on Wed, 16 March 2011 13:10 | I just discovered that I could jump to a #incluide file by CTRL+ LEFT MOUSE CLICK on the #include file name.
So I figure that as a most commonly used function, block comment may as well have being implemented. If it's true, how?
And please share some other little tricks with the IDE that may help to save time and increase productivity.
Thank you for your tips.
|
Hi Lance,
To jump to included file (and many other useful locations, like function or variable declaration) you can also use Alt+j shortcut for context jump. It will jump to location associated with word under cursor. Also Alt+Left arrow/Right Arrow allow you to browse back and forth through the history, so you can easily get back where you were before the context jump.
I am not sure what you mean by block comment function, but you might like to turn on the option "/*( enloses selection" (or something like that, I don't have theide here right now ) in Setup -> Environment. If you then select block of text pressing * or / will comment it out. Similar behavior works also for brackets and some other keys maybe (sorry, speaking from top of my mind here ).
Best regards,
Honza
PS: You should check the key shortcuts setting dialog, it could give you some ideas about what tricks are hidden in the ide
[Updated on: Wed, 16 March 2011 13:29] Report message to a moderator
|
|
|
|
|
Re: Block comment key short cut [message #31604 is a reply to message #31584] |
Thu, 17 March 2011 03:29   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
Lance wrote on Wed, 16 March 2011 09:01 | Thank you very much for your quick response!
By block comment, I mean select a block of code, press some key shortcut or a tool button, voila, all the lines have a pretty
//
preceding them. And you can also BLOCK uncomment selected code lines so that those line are back to life again(preceding first 2 // removed)
The way you mentioned may be functionally equivalent or similar, but it doesn't allow nested actions, eg, you may comment 3 lines and subsequently want to comment a larger block containing these 3 lines. Majority of C++ preprocessors don't accept nested /**/ comment, at least by default.
|
Setup -> Environment -> Assist
Check "[ { ( " / * enclose selection"
Select a block of lines.
Press /
Regards,
Novo
|
|
|
|
|
|
|
|
Re: Block comment key short cut [message #31672 is a reply to message #31664] |
Sat, 19 March 2011 11:43   |
|
Lance wrote on Sat, 19 March 2011 03:04 | I owe dolik.rce a big thank-you. He actually gave me the right answer but I missed the point.
|
No problem In a community assembled from people all over the world, such things just happen easily I already got used to it...
Honza
|
|
|
|
|
Re: Block comment key short cut [message #33114 is a reply to message #33112] |
Thu, 07 July 2011 16:24  |
 |
jibe
Messages: 294 Registered: February 2007 Location: France
|
Experienced Member |
|
|
jerson wrote on Thu, 07 July 2011 11:24 | Look for the abbreviations under Setup menu item.
|
Yes, it's what I was looking for... Probably making some mistake, as for functions it will not be so easy.
I looked for that in the forum and in the help and was unable to find. Just forgot to look at the Setup menu !
I'm almost sure that I saw that somewhere else in the forum, but cannot find it anymore...
Something strange : I cannot edit or delete any item, the buttons are grayed ! But it's possible to use the popup menu that appears when right-clicking on a keyword...
For functions, I added the v keyword, doing this :
I also added p :
Thank you, jerson ! 
BTW : CTRL+[.] works only with the point of the numeric pad...
[Updated on: Thu, 07 July 2011 16:28] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat Apr 26 18:10:00 CEST 2025
Total time taken to generate the page: 0.03781 seconds
|