In the world of programming, Linux has always been a go-to platform for developers due to its flexibility, power, and open-source nature. Linux offers a multitude of options for coding and scripting, allowing programmers to leverage their favorite programming languages seamlessly. While there are numerous text editors available for Linux, one particular editor stands out for its simplicity, versatility, and widespread usage among developers - Gedit.
Gedit, the default text editor for the GNOME desktop environment, is lightweight, intuitive, and highly customizable, making it an excellent choice for editing code in Linux. But did you know that Gedit can do much more than just editing? It can also be transformed into a powerful integrated development environment (IDE) capable of running programs written in various programming languages, including Python, Java, C++, and many others.
In this blog post, we will explore how to harness the potential of Gedit and leverage it as a tool for executing and testing code in Linux. Whether you are a seasoned programmer or a beginner taking your first steps in the world of coding, this guide will provide you with a solid foundation for running Python, Java, or any other language right within Gedit, saving you the hassle of switching between different applications or terminals.
Let's dive in and discover the magic of running code within Gedit in Linux, streamlining your coding workflow and enhancing your productivity.
For this tutorial we will run the classic hello world python program.
1.In Gedit Click the menu icon and open the preferences tab.
2. Select Plugins and tick the box labeled external tools.
3.Once that is done go back to the menu icon and you will see an option to manage external tools.
4. In the manage external tools tab click + icon to add external tool. paste the line bellow in the script and select a language and give a keyboard shortcut to the tool.
5. Replace highlighted "command" with the command that you need to run the code fr this example the command is python3. if you are unsure I will have the commands for a few programming languages on my GitHub, just click here.
6. My keyboard shortcut was Shift+F1 so if I push those keys a new terminal will open withe the output of the code.
Thanks for visiting Net Cloud Insights
comment bellow any questions or suggestions. a video tutorial will be
out soon on YouTube and on an updated version of this post.







Comments
Post a Comment