CodeIgniter Autocomplete for Komodo Edit

Komodo Edit is a great cross-platform, free IDE and editor. However native autocomplete doesn’t work when working with CodeIgniter. Adding the path to the CodeIgniter folder also doesn’t seem to solve the problem.

While searching over the internet, I got some clues of how to achieve it. All you have to do is create a file and name it autocomplete.php (you can name it whatever you like) and copy/paste the following into it:

 * @property CI_DB_active_record $db
 * @property CI_DB_forge $dbforge
 * @property CI_Benchmark $benchmark
 * @property CI_Calendar $calendar
 * @property CI_Cart $cart
 * @property CI_Config $config
 * @property CI_Controller $controller
 * @property CI_Email $email
 * @property CI_Encrypt $encrypt
 * @property CI_Exceptions $exceptions
 * @property CI_Form_validation $form_validation
 * @property CI_Ftp $ftp
 * @property CI_Hooks $hooks
 * @property CI_Image_lib $image_lib
 * @property CI_Input $input
 * @property CI_Language $language
 * @property CI_Loader $load
 * @property CI_Log $log
 * @property CI_Model $model
 * @property CI_Output $output
 * @property CI_Pagination $pagination
 * @property CI_Parser $parser
 * @property CI_Profiler $profiler
 * @property CI_Router $router
 * @property CI_Session $session
 * @property CI_Sha1 $sha1
 * @property CI_Table $table
 * @property CI_Trackback $trackback
 * @property CI_Typography $typography
 * @property CI_Unit_test $unit_test
 * @property CI_Upload $upload
 * @property CI_URI $uri
 * @property CI_User_agent $user_agent
 * @property CI_Validation $validation
 * @property CI_Xmlrpc $xmlrpc
 * @property CI_Xmlrpcs $xmlrpcs
 * @property CI_Zip $zip
 * Add addtional libraries you wish
 * to use in your controllers here
class CI_Controller {};

 * @property CI_DB_active_record $db
 * @property CI_DB_forge $dbforge
 * @property CI_Config $config
 * @property CI_Loader $load
 * @property CI_Session $session
 * Add addtional libraries you wish
 * to use in your models here.
class CI_Model {};

Save the file and now open Komodo Edit. From the menu, open Edit and select Preferences option. A dialog window will appear. From the Category on the left side, select Languages and then further select PHP option (as shown in the picture below):

CodeIgniter Autocomplete for Komodo Edit

CodeIgniter Autocomplete for Komodo Edit

Add the directory which contains the newly created autocomplete.php file to the section PHP Directories and restart Komodo.

This should be enough for the autocomplete!


Komodo Edit Shortcut Cheat Sheet

Cheat Sheet

Find next F3
Incremental search Ctrl + I
Find in files Ctrl + Shift + F
Close Ctrl + 4
Go to line number x Ctrl + G
Go to matching brace Ctrl + J
Decrease indent Shift + Tab
Add block comment Ctrl + 3
Remove block comment Ctrl + Shift + 3
Show line numbers Ctrl + Shift + 4
Reflow paragraph Ctrl + Q
Select block Ctrl + B
Select to matching brace Ctrl + Shft + ]

Adding an Applicant/File to Unity Launcher

Ubuntu’s Unity has become very stable and user-friendly since its early days. Most applications when installed using the Ubuntu Software Center will add their icon to the Unity Launcher (on the left). But this tip will help you add icons as you like.

Adding any Running Application to Launcher

Simply right click on the application’s icon that is shown in the Unity Launcher. A pop-up menu will be shown up. This menu although may slightly vary as it has undergone minor design changes over the last few Unity based distributions. The option labeled Keep in Launcher is responsible for this task. Clicking it will ensure that this icon remains their even if the program is closed.

Similarly, if you would like to remove it, just right click on the icon again and clicking on Keep in Launcher will remove it from the Unity Launcher.

Unity also allows you to easily reorder the items in the Launcher by simply dragging and dropping.

Adding a Custom Icon to Launcher

Although adding an icon to the Launcher is easy but at times a user defined icon or an application not installed from the Software Center with a custom icon. For that the following file needs to be created with the following contents (as a sample I will be creating this file for Komodo Edit):

[Desktop Entry]
Name=Komodo Edit 6.1
Comment=Free multi-platform editor that makes it easy to write quality code.
Exec=/home/user1/Komodo-Edit-6/bin/komodo %F

The important lines are Name, Exec, Icon, Terminal and Type.

Now save this file with the name komodo.desktop and move it to the required application folder.

For system-wide access:

sudo mv komodo.desktop /usr/share/applications/

For user-only access:

sudo mv komodo.desktop ~/.local/share/applications/

This will also enable your application to appear in the Dash, as shown below:

Finally, open your application from Dash and click on the Keep in Launcher option as explained above. That’s it!