01 Mar 2017 / Technical

Know Your IDE

Sujith UC

Writing a program is now much more effortless with IDE! If you don’t know what you are doing, an IDE will go a long way to protect you from having to learn. The IDE will group all of your development environment in one big window, and will prevent you from spreading things out over the desktop to suit yourself - unless, of course, you can do that while remaining within the one big window.

Some advantages of using IDEs:

  • Easy to use
  • Less time and effort
  • Simplifies the creation of database applications
  • Does not require a detailed knowledge of database
  • Provide facilities to create an attractive user interface with menu, buttons, text boxes etc
  • Provides predefined facilities to search, sort, retrieve and process data in database

1) NetBeans

Netbeans is one of the very powerful IDE is out there.

  • Duplicating a line: Ctrl + Shift + Up Arrow / Down Arrow
  • Formating selected portion of your code: Alt + Shift + F
  • Formating a full page: Alt + Shift + F
  • Change a selected text to uppercase: Ctrl + U then release Ctrl and press U
  • Change a selected text to lowercase: Ctrl + U then release Ctrl and press L
  • To find anything: Ctrl + F
  • To find & replace: Ctrl + H
  • Jump to a specific line: Ctrl + G
  • Comment / uncomment a line: Ctrl + Shift + C
  • Move up or down a line: put the cursor anywhere in that line and press Alt + Shift + Up / Down arrow.

You can set how to format your code when you press Alt + Shift + F as follows:
Tools -> Options
Then you can see the following window

You can set formating options for each language you using. It’s possible to set line breaks, braces, tabs, alignment of ‘=’ when assigning values to variables like below:

Usually we will specify our name as ‘author’ when writing code, we can set this to add automatically to our code in netbeans:

Tools -> Templates
Then you will get a window like this:

Select the template you want to set author information, then press settings button. Also you can add your own templates too.

You can see the difference between two files in netbeans easily. Also you can add lines from file1 to file2 in the difference window itself.

Open the two files you want to compare in netbeans, right click on the tab showing file name at the top of code editing window, then you will get a menu as follows:

Then you will get a window to select the file to compare. Select the file and press ‘diff’, you will get the following window:

You can see the history of a file and see the differences between current file and selected history as follows:

Also netbeans provides support for PHP DocBloks – the standard code documentation.
A DocBlock is a piece of inline documentation in your source code that informs you what a class, method or other Structural Element its function is. First write your function then, go to the above of that function and write as follows and press enter then you can see the rest as follows;

2) Geany

  • Go to a specific line: Ctrl + L
  • Goto matching brace: Ctrl + B
  • Go to current line: Ctrl + Shift + L
  • Duplicate current line: Ctrl + D
  • Insert Current Date: Shift-Alt-D
  • Comment / un-comment current line: Ctrl + E
  • Toggle case selection: Ctrl +Alt + U
  • Increase current line indentation: Ctrl + I
  • Decrease current line indentation: Ctrl + U
  • Move the current line or selected lines up by one line: Alt-PageUp
  • Move the current line or selected lines up by one line: Alt-PageDown
  • Switch to last used document: Ctrl + tab
  • Closes the current file: Ctrl + W

3) Sublime Text Editor

  • Select current line: Ctrl +L
  • Increase current line indentation: Ctrl + ]
  • Decrease current line indentation: Ctrl + [
  • Comment / un-comment current line: Ctrl + /

Selected text to uppercase: Ctrl + K + U
Selected text to lowercase: Ctrl + K + L

This is just a start and wish to grow this list with more useful tips.