Fake Web IDE with External Tools in Gedit

| software | foss | programming |

Gedit is my favorite text editor. I like that it is fast, reliable, cross platform, and has a ton of useful plugins and features. I am currently using it to work with LaTeX and unless I am working on a huge project, I will typically use gedit for all of my development work, specifically when it comes to web development. I use a lot of the plugins in gedit, but I have never used the External Tools plugin before. External tools is a very useful plugin because it allows you to do pretty much anything. The reason why I wanted to use it in the first place was to find a way to quickly launch HTML files that I was currently working on in a web browser, while also saving all of the changes to other HTML/CSS/JavaScript files that were related and currently opened in gedit. This is essentially what an IDE would do when you hit Run. In the past, I would just save all of my document and find the file in Nautilus to launch it. The problem with this approach is that I have an obsessive need to organize all of my projects into obscure and seemingly endless file paths. This can make it pretty difficult to find the file that I am looking for. The External Tools plugin solves all of these issues in a very elegant and simple way. So, without further ado, here is how you make a fake Web Development IDE in Gedit using External Tools.

  1. Enable External Tools: Edit –> Preferences –> Plugins
  2. Create a New External Tool: Tools -> Manage External Tools -> Hit the Plus sign
  3. Name the tool whatever you would like
  4. Assign it a shortcut key (optional)
  5. Set the following options on the bottom right
    • Save: All Documents
    • Input: Current Document
    • Output: None
    • Applicability: All Documents
  6. In the script editor, enter the following short script. This script will open the current document in your default web browser.
    #!/bin/sh x-www-browser $GEDIT_CURRENT_DOCUMENT_PATH 
  7. Close, and you are done!
You should now be able to use whichever shortcut you created to save all documents that you are working on, and open the current document in a web browser. This makes debugging much easier for web applications, and makes gedit a perfect lightweight web IDE.

If you have some handy tips and tricks for gedit custom tools, please share in the comments below!

Thank you for reading! Share your thoughts with me on mastodon or via email.

Check out some more stuff to read down below.

Most popular posts this month

Recent Favorite Blog Posts

This is a collection of the last 8 posts that I bookmarked.

Articles from blogs I follow around the net

Script Doctoring

I’ve been having a number of communications problems in my interactions with my doctors at Kaiser lately, and it’s becoming one of those things where the burden and onus entirely is placed upon me to sort out, and that’s exhausting for the actually autist…

via Bix Dot Blog October 22, 2024

Blockchain company Forte acquires games studios, demands secrecy, shuts them down

Sometime in 2023, blockchain firm Forte acquired game studios Phoenix Labs and Rumble Games. However, it would be a year before this came to light, because according to a report from Game Developer, Forte demanded secrecy from employ…

via Web3 is Going Just Great October 22, 2024

Initial explorations of Anthropic's new Computer Use capability

Two big announcements from Anthropic today: a new Claude 3.5 Sonnet model and a new API mode that they are calling computer use. (They also pre-announced Haiku 3.5, but that's not available yet so I'm ignoring it until I can try it out myself.) Comp…

via Simon Willison's Weblog: Entries October 22, 2024

Generated by openring