Editors for Fortran development under Linux

Under Linux we use UltraEdit for Fortran development. It has syntax colouring, supports large number of open files and has all of the usual editing facilities including column format. But it crashes. Mean time between failures is about 3 hours and the crashes are not recoverable.

Can anyone recommend an alternative?

VSCode works on all OS and with almost any file format you can think off.

I use it daily and natively on Windows and Linux.

I highly recommend jEdit. It runs under Java, is cross-platform, supports modern Fortran syntax highlighting and has an extensive plugin library.

I’ve been using jEdit for Fortran coding for over a decade and crashes have been extremely rare.

I use vim and it NEVER crashes :grinning_face_with_smiling_eyes:

I’ve been using emacs for over 40 years, long before linux existed. It has more features than I have ever used during that time.

I have been using Kate for most projects (Fortran and other) in the past 15 years and it hasn’t crashed once. (I like KDE the software ecosystem in general). Before that and in between, I also used Emacs quite a bit. Never had any issues with it, but it’s half an operating system.

I had a sysop for a large government HPC system joke that Emacs was as much lifestyle and religion for some folks as it was a text editor. He also resisted installing it on the system login nodes because he claimed it would quickly gobble up all of the available memory on a node. Don’t know if thats true or not.

I use Vim and VSCode on all three platforms (Linux, macOS and Windows).

This thread got me thinking about alternatives to vim on Linux (there are several that show up in my Linux Mint software manager). However, my two favorite editors are my first interactive editor (EDT on VAX/VMS) and the Enhanced Editor on OS/2. I searched to see if anyone had ported either one of these to Linux and was surprised to see that a mostly compatiable version of EDT exits. Anyone tried it. The Enhanced Editor is still the most powerful editor I’ve used since you could write scripts (some variant of REXX if I remember correctly) that could do just about anything you would ever want to do with an editor.

I am eagerly waiting for an equivalent to this funny video about emacs to have a vim equivalent. I use vim for most of my work and vscode when I am exploring a new codebase, if I am already familiar with it I just vim my way through life.

gedit and vi(m).

I used emacs (either spacemacs or doom) for 10-15 years and transition to neovim 5 years ago. Really happy with it.

Found this recent article on 50 text editors for Linux. Along with the usual suspects there are some new ones written in Rust that look interesting. In particular, the Zed editor which claims to allow integration with LLMs. There appears to be Fortran support via a third party plugin (I think it uses a language server).

Personally I use vim and a .exrc file dating back to vi that I used long ago to add the functions I wanted. On the PC VScode is used the most; on GNU/Linux gedit, vim, emacs are the three most popular around my haunts. Was personally surprised to find gedit was the most popular. Other editors are used but just a user here or there.

Used to have to use so many editors (EDT, FSE, XEDIT, emacs, vi, …) that I was thrilled when I learned how programmable xterm is; and created key maps
for each OS so that you could hit the same keys in any of the editors and get the same operation. It was very popular because many people had to work on the IBM, Prime, DataGeneral, NOS, VMS, … systems. Do not miss having to know eight different commands to list my filenames. Although catlist had some functionality that ls does not have to this day. … used to teach an Emacs course, do not even remember how to use it; remember calling vi more than one four-letter word when first using it; basically do not use anything else anymore.

I also have been using Kate. However, it irks me that apparently is not possible to open the files in a project as read-only, to avoid accidental edits.

Sure. Happy to recommend Sublime. It has plugins to recognise many languages and can open directories as projects if that’s your thing.
I don’t recall it crashing despite the abuse I’ve subjected it to since Ubuntu 16.04.

3 Likes

how had I not seen this, I am dumb hahaha

Having to standardize a dev environment across an academic group I’ve opted for VS Code.

  • Modern Fortran + fortls are amazing. They are also trivial to set up on Linux, especially with a well defined .vscode/settings.json in the repository.
  • Supports other languages just as fine or better than Fortran. For example, Python support is top notch.
  • It’s free. I can’t imagine the pain trying to go through procurement for an IDE/Editor.
  • It’s Microsoft. For managed devices especially, IT lowers their guard for anything M$ related. I’ll take it. We are not even allowed Firefox or Chrome installed, less common IDEs can be much harder to get approved or supported.
  • It interfaces with HPC nicely. By using the “Remote Development” extension one can set up a persistent SSH connection to the login node (if that’s permitted. It mostly is, from what I’ve seen). There is a caveat: the remote tooling relies on Node.js running on the frontend/login node. With a handful of users this is usually fine; at larger scale it can become an avoidable source of CPU load, so local policy matters.
    • Remote editing can be a blessing for a lot of users
    • The Explorer GUI is very useful (most basic filesystem operations supported)
    • It also lets you move files to and from the HPC from the Explorer pane: Copy/paste or drag/drop and right-click->download. Handy, especially if opsec has disabled direct SSH access making rsync impossible.
  • Git integration is very very good. Personal favourite is partial staging by highlighting diff ->Stage Selected Ranges (or use a keyboard shortcut)
  • Terminal integration is good. Much better than using putty or mobaxterm (for those coming from Windows or use VSCode from WSL) and at least on par with the basic Ubuntu terminal.

On the flip side, I’ve seen it crash, though rarely. It can be a bit slow for extremely large projects. It needs careful configuration for the watcher/indexing of files. Given its release cadence, version mismatches are not unheard of. They are a pain to diagnose, especially remotely for other people.

I have been using Emacs for about 30 years :sweat_smile:, but I would like to use VScode also because it seems to have a lot of useful functionality… :wink: