Modern Fortran averages +7k new installs every month (which is different than downloads) so I was curious how that number fairs with the rest code editors and IDEs.
It would be great if you could share this within your research groups, company teams, etc. to get some decent statistics.
Please feel free to edit the poll to add your editor/IDE if it is not listed.
If you choose Other I would appreciate it if you commented the Editor’s name.
I think there should be an option for selecting at least two options as some people might have used more than 1 editor. For example, I used two editors for Fortran mentioned in the options above.
Unfortunately, it is not possible to edit a poll more than 5’ after posting. Also, I don’t necessarily think we should try and understand how, or how often, people use different editors. The most used editor to code in Fortran will suffice. For example I use Vim quite a bit, probably 20-25% of the time but I would not consider casting my vote to Vim.
I’ve been using Atom for a few years now, after using Vim almost exclusively for several years before that. I have a couple colleagues who use VSCode, and I’m getting pretty tempted to make the switch, not least of all if that is where the Fortran plugins will primarily be targeted.
I’ve been using Emacs for decades, recently also tr Atom, mainly to try Fortran Language Server fortls by @gnikit but the Atom’s extension needed seems not to exist anymore.
I’d be grateful for any clear instructions to install and use such an aid for any of the two editors. I’d rather stay away from M$
Assuming you mean Microsoft, they’ve owned GitHub for a few years now, so there’s probably little difference between Atom and VS Code in this sense. They’re both open-source with a permissive license, but using either of these editors indirectly supports Microsoft.
FWIW, I use VS Code in Vim mode, and stand-alone Vim (second choice).
For my (low) intensity of involvement in serious programming I’d rather stick to editors that I know. If there is a possibility to get some hints, help, completion of the language constructs etc., in these editors, it would be great.
Well that is my bad, I spent an hour a while back setting up an Atom extension explicitly for fortls but I had trouble doing quick local tests of the extension without having to push to GitHub so I gave up on that. So this section in fortls’s documentation is not entirely truthful.
For Atom, your best bet right now is to use these 2 extensions:
Sunsetting Atom - The GitHub Blog
Then download fortls either through pip or anaconda and setup your server options from a json file at the root dir of the project. See all the configuration options here
Arguably, VS Code is a lot easier to setup, simply install Modern Fortran and everything should work out of the box.
For EMACS you can try these instructions, but full disclaimer I have never been an EMACS user so I am not sure if my instructions are correct.
Long time ago, I was using vim and I’m still using it for small codes.
Then about 10 year ago, I’ve switched to eclipse+photran, but I’ve had to much troubles with large codes.
So 2 or 3 year ago, I’m moved to atom, although, I’m starting to have troubles.
at least not bad at all. It seems have all the features (perhaps even better) as Intel Fortran + Visual Studio (with “visual studio productivity power tools” extension) does. It has all the grammar high lighting, intellisense, et al.
The debugger perhaps is weaker, but I have not carefully check that youtube video, perhaps in that series of video the author somehow explained how to debug and more using VS Code.
For Intel Fortran + VS code, I found a thread,
One good features of Code :: Blocks is that, if I remember correctly, it can generate a Makefile such that dependence of the modules is listed. This is useful and convenient.
Nice to see that Lukas made a video for VS Code Fortran, I recall he opened a few issues a while back in Modern Fortran.
As for the VS Code extensions, you should either use Modern Fortran or the other 3 extensions + the formatting one (fprettify I think).
My obviously biased opinion is to use Modern Fortran Pre Release version since it does what the others extensions combined achieve and quite a bit more.
A list of all the issues associated with fortran + Breaking point support + FORTRAN Intellisense can be found here but the TLDR is
fortran is stale, has minimal syntax highlighting and lacks a linter, formatter, debugger or interface with a Language Server.
Breaking point extension is stale, and the way it tries to use the C++ debuggers is not permitted anymore.
FORTRAN Intellisense is stale, it is an interface for the old Language Server by hansec. It has an outdated interface
formattig Only supports fprettify
There are a lot more things going on in Modern Fortran, like linting support for Intel compilers, findent formatter support, rich and robust syntax highlighting (that is actually tested), lightweight autocompletion for systems lacking fortls - Language Server, etc.
Yeah, exactly, I looked at the settings in modern Fortran extension, it seems to be a one size fits all solution.
The only reason I installed the Fortran intellisense is that it can show the variable/subroutine/functions properties/informtaion when my mouse hover on them (like Intel Fortran + Visual Studio does), for example, when I put my mouse on a subroutine of mine called mydiffeq_init, the intellisense shows the information of my subroutine as below,
Without Fortran intellisense, I am not very sure if such information can still be displayed. But one of the drawback of Fortran intellisense is that it requires installing fortran-language-server using pip, and sometimes it cannot find the installed fortls.exe, and I have to manually set it in the extension settings.
The hover information are served as part of the Language Server.
What FORTRAN Intellisense does is it registers a Language Server to the parent VS Code Fortran extension i.e. Modern Fortran or fortran. FORTRAN Intellisense was made to work with hansec’s fortran-language-server. Since v3.0+ in Modern Fortran Pre-Release a Language Serve can be registered automatically so FORTRAN Intellisense is not required anymore.
Furthermore, I updated Modern Fortran to use the new fortls Language Server instead of the old one (Full disclaimer I am the author of fortls)
This is how my VS Code session looks like with just Modern Fortran and fortls.
Generally I use conda install to install binaries rather than pip install. So is it possible to install fortls using conda install and eventually use in VSCode for Fortran? I see that Fortran-language-server is available in Anaconda.org, but I could not find fortls.
FYI fortls has an autoupdate feature which checks PyPi for new releases. In conda environments that is disabled you will have to manually fetch updates when released (I think a notification message will still show)
The easiest poll ever, at least for me. Emacs all the way.
For the sake of completeness, however, I should mention that if you don’t know Emacs (or don’t want to know), Geany, Code::Blocks, Eclipse/Photran (sic), and Vim are all decent choices. Anything related to V$ Code and Atom is out of question. The old Sun Studio coming with their own Fortran compiler was good as well, however it’s long gone and I didn’t try its successor.
I use Vim exclusively because a lot of work I do involves logging into remote HPC systems and I find Vim is still the best option for me for coding on remote systems. Plus I’m now to old a dog to learn a new trick. Vim was the first Unix/Linux editor I learned and it still suits my needs for an editor better than other options I’ve tried. I took a look at Emacs once and decided it was as much a “lifestyle” as it was an editor. Also, the admins on one system I used (many years ago now) refused to install Emacs because they claimed (although I never verified it was true) that versions in that era had a nasty habit of grabbing all the available memory on a login node. Actually, the best all around editor I’ve used was the IBM OS2 Enhanced Editor (EE). I’ve always wished IBM would see the light and open source it but that will never happen as long as IBM is IBM.