Text editors support us to create and write codes in various programming languages. In several text editors (such as Visual Studio Code), they can also execute code written without executing or compiling the code in external terminal.
Many operating systems has their own standard text editor such as Linux with its own text editor
gedit. Unlike other standard text editors,
gedit has special features. It can highlight codes based on code written, and it can also execute codes using plugins!
I'm currently using Ubuntu 18.04 as primary operating system and get interested to try external tools plugin in
gedit which has been installed by default in Ubuntu 18.04.
By opening Text Editor first
By clicking text editor menu on the Top Bar and accessing the preferences...
Accessing Plugins tab, we can enable "External Tools" by checking it and finally use it...
Finally, we can create some extra commands for executing code externally by access external tools menu (by clicking Text Editor menu -> Manage External Tools...).
By clicking the plus sign button in the bottom left corner, it will create the new empty tool). There are interesting stuffs that we can see with this external tools menu
Space for writing external tools command (usually using Linux
bashcode, but in my observation it can also use
- Shortcut key for triggering keyboard shortcut to execute the commands.
- Input for specify the input source (if the program receives some input).
- Output for specify the output.
- Applicability for specify which document supports for this external tool command.
and applying shortcut using F5, we have successfully created our first external command.
$GEDIT_CURRENT_DOCUMENT_NAME is some
gedit variable that we can see in this link.
Let's test our command in our simple JS file by pressing F5 and we found show the results based on Node.js command.
And it also executes successfully on Python file
gedit can executes file externally using external tools. By using some
bash code, it can used for create command for execute codes for various functions.
- GNOME Gedit External Tools documentation (https://wiki.gnome.org/Apps/Gedit/Plugins/ExternalTools)