Gedit: use snippet, code faster
3 posters
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Gedit: use snippet, code faster
If you are looking for a C/C++ editor, I will suggest gedit, the gnome official text editor. And here, I am going to tell about one of the most powerful IDE feature of gedit, Snippets.
Note: Before reading this, you are requested to consult this.
Snippet allows you to insert frequently used codes using shortcuts. For example, you possibly always write something like this in your C program:
If you have activated Snippet, you can insert the whole code block by typing "main" and pressing tab.
Here is how to make it work.
First activate the Snippet plugin. Many snippets are defined by default. You can modify them if you wish. Also, you can add your own snippets.
Go to Tools > Manage Snippets...
A new window will be opened, Like this.
As you can see, I have marked some places with 1, 2...
Here, snippet for do-while loop in C is selected.
5 shows the text to be inserted.
4 shows what to type to insert the text. (Means, type do and press tab to insert 5)
To define a new snippet click on 1, then insert the required fields.
You can save your snippets by clicking 3.
Also, you can import snippet. Click 2.
I have defined some snippets for java, C, C++, and html. Feel free to use them.
I update my snippets very frequently, I will try to update the file also. Check the future posts for updates. But, I recommend to define your snippet yourself so that you can easily remember. However, you need not remember all the snippets, because if you type first few letters and press cntr+space, you will be shown all matching snippets.
So, activate Snippets, press tab, code faster...
Note: Before reading this, you are requested to consult this.
Snippet allows you to insert frequently used codes using shortcuts. For example, you possibly always write something like this in your C program:
- Code:
#include
int main(void){
return 0;
}
If you have activated Snippet, you can insert the whole code block by typing "main" and pressing tab.
Here is how to make it work.
First activate the Snippet plugin. Many snippets are defined by default. You can modify them if you wish. Also, you can add your own snippets.
Go to Tools > Manage Snippets...
A new window will be opened, Like this.
As you can see, I have marked some places with 1, 2...
Here, snippet for do-while loop in C is selected.
5 shows the text to be inserted.
4 shows what to type to insert the text. (Means, type do and press tab to insert 5)
To define a new snippet click on 1, then insert the required fields.
You can save your snippets by clicking 3.
Also, you can import snippet. Click 2.
I have defined some snippets for java, C, C++, and html. Feel free to use them.
I update my snippets very frequently, I will try to update the file also. Check the future posts for updates. But, I recommend to define your snippet yourself so that you can easily remember. However, you need not remember all the snippets, because if you type first few letters and press cntr+space, you will be shown all matching snippets.
So, activate Snippets, press tab, code faster...
Last edited by BIT0102-Mohaimin on Sun Sep 26, 2010 1:55 am; edited 3 times in total
BIT0102-Mohaimin- Programmer
- Course(s) :
- BIT
Blood Group : B+
Posts : 415
Points : 715
Re: Gedit: use snippet, code faster
Bravo... simply.. Bravo
I am really impressed by this quality post
I am really impressed by this quality post
Similar topics
» Preparing gedit for programming
» making Ubuntu 9.10 Bootup faster
» Faster Download !! Ubuntu Archives in Bangladesh
» FireFox tweaking for faster internet
» Run TREE make UBUNTU faster.................
» making Ubuntu 9.10 Bootup faster
» Faster Download !! Ubuntu Archives in Bangladesh
» FireFox tweaking for faster internet
» Run TREE make UBUNTU faster.................
IITDU Forum :: TechTalks :: Ubuntu
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Tue Sep 29, 2015 2:45 pm by Sophiawood
» Cisco EHWIC SFP/GE WAN Card
Mon Sep 07, 2015 11:08 am by Sophiawood
» Huawei S1700-28GFR-4P-AC Price
Thu Jun 25, 2015 2:31 pm by Sophiawood
» teach yourself C++ / Herbert Schildt Solutions
Wed Jun 03, 2015 1:52 pm by Abdullah Al Noman
» teach yourself c by herbert schildt pdf
Wed May 13, 2015 11:01 pm by Raquib Ridwan
» ASA 5506X With Firepower ASA5506-K9
Fri Apr 10, 2015 4:31 pm by Sophiawood
» New Trends in Deal Business
Tue Feb 03, 2015 9:38 pm by nersoa
» PoE Power Allocation for WS-C2960S-24PS-L
Wed Nov 05, 2014 11:12 am by Sophiawood
» How to cure back pain
Fri Oct 31, 2014 7:15 pm by Bergen Guildford