Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: ahlongxp on October 11, 2006, 04:24:21 pm
-
I don't know how to make use of it.
can someone give me a small sample?
-
CodeSnipppets allows you to create a 'library' of snippets of code that you want to resuse.
For example, lets say that you start each program with an elaborate comment. Rather than have to type it over and over, you simply highlight the comment (or any number of lines) and drag it into the codesnippets window. It will then allow you to give it a name.
Open a new file and double click on the name you chose for the snippet, and it will place that code at the cursor.
Its like a clipboard that can hold any number of 'snippets' of code that you can reuse at anytime.
Very useful!
-
CodeSnipppets allows you to create a 'library' of snippets of code that you want to resuse.
For example, lets say that you start each program with an elaborate comment. Rather than have to type it over and over, you simply highlight the comment (or any number of lines) and drag it into the codesnippets window. It will then allow you to give it a name.
Open a new file and double click on the name you chose for the snippet, and it will place that code at the cursor.
Its like a clipboard that can hold any number of 'snippets' of code that you can reuse at anytime.
Very useful!
thanks a lot.
but there's a problem. can I preview the selected code snippet beside applying it
-
Apparently not. However, you can name each snippet. Probably designed for small pieces of code, so you can drag them into the editor, and if its not to your liking delete it.
Perhaps you can suggest this as an enhancement to the developer.
-
but there's a problem. can I preview the selected code snippet beside applying it
No you can't, yet.