User forums > Using Code::Blocks
what is CodeSnippets for?
(1/1)
ahlongxp:
I don't know how to make use of it.
can someone give me a small sample?
BCCISProf:
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!
ahlongxp:
--- Quote from: BCCISProf on October 11, 2006, 04:52:07 pm ---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!
--- End quote ---
thanks a lot.
but there's a problem. can I preview the selected code snippet beside applying it
BCCISProf:
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.
artoj:
--- Quote from: ahlongxp on October 12, 2006, 07:34:39 am ---but there's a problem. can I preview the selected code snippet beside applying it
--- End quote ---
No you can't, yet.
Navigation
[0] Message Index
Go to full version