This tutorial explains how to set default editor in Ubuntu Linux for PHP files and FileZilla client program. Learn how to set your preferred editor as default editor for specific file types.
The gedit is the default editor in Ubuntu Linux. By default, Ubuntu opens all text files with this editor. This editor provides basic features and functions for creating, editing and updating the text files.
These features and functions are sufficient if you only work with the simple and regular text files such as log files. But if you mostly work with the advanced types of files such programing language files, you should use an editor that is specifically built for those types of files.
For example, for editing the programing files you can use the Komodo Edit. Komodo Edit is a free and open source editor. It provides several advanced features and functions such as; syntax highlighting, regex search and replace, error detecting, indenting, etc.
To learn how to install it in Ubuntu, you can check this tutorial.
How to Install Komodo Edit on Ubuntu Linux
Installing a new editor does change the default editor. It means even if you have installed your favorite editor for editing and creating the specific types of files, Ubuntu will keep opening those files with default editor.
To open a specific type of file with a particular editor, we must have to update the setting of default editor for that specific file type.
Setting default editor for PHP files in Ubuntu Linux
The process of setting up the default editor is same for all file types. For demonstration purpose, I will set Komodo Edit as the default editor for PHP files. By following the same method, you can setup the default editor for any file type.
To setup default editor for php files, select any php file and do right click. From right click context menu click the "Properties" option.
From the opened window, click the "Open With" tab.
This tab displays the currently set default editor as well as other available editors for php files.
It also allows us to set other editor as the default editor from available editors. To set other editor as the default editor, select that editor from the list.
Click the "set as default" button. This will change the default editor.
After this update, Ubuntu opens all php files with Komodo instead of the gedit.
Setting default editor in FileZilla FTP client program
FileZilla FTP client program is used to transfer files from local computer to remote server. It is also used to edit and update files stored in remote server. By default, it uses the default editor of system to open files.
In above section, we changed the default editor for php files. Changing the default editor for a specific file type does not change the default editor of system. It means, FileZilla will continue uses the gedit to open the remote files.
To change the default editor in FileZilla, click the Edit menu item. From opened sub-menu, click the Settings option.
This opens the Setting screen. The Setting screen is divided in two parts. Left part lists all options. Right part displays the detailed description of the selected option from the left part.
Select the "File editing" option from the left pane. Out of the related options in the right pane, select the "Use custom editor" option.
Now provide the complete path of the launcher file of custom editor. If require, use the browse button to locate the launcher file.
Launcher file of an application is the script file which starts that application. The launcher file of Komodo Edit is the following.
[installation-dir]/bin/Komodo
Here [installation-dir] is the directory in which Komodo Edit is installed.
Once this setting is updated, click the OK button to save and close the setting screen.
After this change, FileZilla will use the Komodo, instead of the gedit, to open the files.
That's all for this tutorial. If you like this tutorial, please don't forget to share it with friends through your favorite social site.