[Linux] Turn the IDE gedit – Make geidt is an IDE

Gedit is a text editor default on linux distros. At first glance it seemed to have nothing interesting, however, if a little tinkering, you may find it very interesting and even more amazing is expected! Please observe the following image to see a somewhat.

gedit turn into IDE

To be able to do gedit become so great, we just need to install the plugins for gedit and activate them is finished! First we make install plugins for gedit with the command:

sudo apt-get install gedit-plugins

Now, we will start “respiratory variables” gedit by going to menu Edit/ Preferences

Show line numbers in gedit

At tags View you choose display line number, such as gedit has line numbers displayed on the left.

Highlight current line

At tags View you choose Highlight current line, from now, the line containing the cursor will be highlighted.
Also here, you choose Highlight matching brackets to highlight the opening and closing tags. For example, when you put the mouse pointer to the code pointed parenthesis ({) immediately enclosed in angle brackets corresponding to it will be highlighted.

Tab in gedit

At tags Editor You choose the number of spaces with a tab mark in Tab width, The default is 8, but I usually put the 4.
Normal, when you press Enter to newline, the cursor will move to the beginning of the next line and you have to use a few tabs to put the cursor on a straight line, Now you just need to choose Enable automatic indentation is the newline, pointer in a straight line with the tab above.

Typography and color

At tags Font and color you will be choosing the font and font color, background color that you want. In the picture above is the font of your choice Ubuntu mono 13 and the color Oblivion. You also can download other color systems and more by clicking the plus sign below to select the color system downloaded.

Plugins

– Bracket Completion: Automatic closing brackets
– Code Comment: Mark notes shortcuts Ctrl + M or – Ctrl + Shift + M
– Embedded Terminal: Open a terminal simple right below the window like the picture above. Open the terminal by Ctrl + F9
– External Tools: implementation of external commands and shell scripts
– Insert Date/Time: Insert time at the cursor position.
– Text size: Change text size by Ctrl + or Ctrl – or hold Ctrl and the middle mouse wheel.
– Snippets: Automatically complete the code you use by pressing Ctrl + Space (spaces). You can go to menu Tools / Manage Snippets to add the keywords you want to turn off.

snippets in gedit

– Automatic formatting code: you can easily perform calibration code correctly formatted and beautiful by following:
+ Activation External Tools
+ Installing vim command:

sudo apt-get install vim

+ On the menu Tools / Manage External Tools:
+ Choose mark “+” to add tool
+ Enter the code below
+ Selecting components (like the picture below).

#!/bin/sh
CMD_FILE_NAME=.formatcommand;
TMP_FILE_NAME=.tempvimfile;
touch $CMD_FILE_NAME&&echo "gg=G :wq! "$TMP_FILE_NAME > $CMD_FILE_NAME&&(vim $GEDIT_CURRENT_DOCUMENT_NAME -s $CMD_FILE_NAME > /dev/null 2>/dev/null)&&rm $CMD_FILE_NAME;
cat $TMP_FILE_NAME
rm $TMP_FILE_NAME

autocomplete code

Now, simply press Ctrl + Shift + F Your entire code is formatted neatly and beautiful.

With reference to the article at tuyetkiem.wordpress.com