# Code Editors/IDEs used for Fortran

**URL:** <https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139>\
**Category:** Poll\
**Created:** [April 5, 2022, 12:00pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139 "2022-04-05T12:00:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 5, 2022, 12:00pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/1 "2022-04-05T12:00:39Z")

</div>

With the [Modern Fortran VS Code extension coming to Fortran Lang](https://fortran-lang.discourse.group/t/modern-fortran-vs-code-extension-migrating-to-fortran-lang-on-github/3117) I was wondering what is the main editor people use in this community.

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.

_Poll ([view on site](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/1))_

---

<div class="post-metadata">

**Author:** ![snano](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@snano](https://fortran-lang.discourse.group/u/snano)\
**Post date:** [April 5, 2022, 12:16pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/2 "2022-04-05T12:16:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 5, 2022, 1:06pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/3 "2022-04-05T13:06:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![everythingfunctional](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/everythingfunctional/32/176_2.png) [@everythingfunctional](https://fortran-lang.discourse.group/u/everythingfunctional)\
**Post date:** [April 5, 2022, 2:19pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/4 "2022-04-05T14:19:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![msz59](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@msz59](https://fortran-lang.discourse.group/u/msz59)\
**Post date:** [April 5, 2022, 2:51pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/5 "2022-04-05T14:51:37Z")

</div>

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$

---

<div class="post-metadata">

**Author:** ![milancurcic](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/milancurcic/32/2_2.png) [@milancurcic](https://fortran-lang.discourse.group/u/milancurcic)\
**Post date:** [April 5, 2022, 3:03pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/6 "2022-04-05T15:03:18Z")

</div>

> [@msz59](#):
>
> 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).

---

<div class="post-metadata">

**Author:** ![msz59](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@msz59](https://fortran-lang.discourse.group/u/msz59)\
**Post date:** [April 5, 2022, 3:09pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/7 "2022-04-05T15:09:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 5, 2022, 3:13pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/8 "2022-04-05T15:13:32Z")

</div>

> [@msz59](#):
>
> `fortls` by @gnikit but the Atom’s extension needed seems not to exist anymore.

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](https://gnikit.github.io/fortls/editor_integration.html#atom) 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](https://atom.io/packages/language-fortran)
- [Sunsetting Atom - The GitHub Blog](https://atom.io/packages/ide-fortran)  
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](https://gnikit.github.io/fortls/options.html#configuration-using-a-file)

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](https://gnikit.github.io/fortls/editor_integration.html#emacs), but full disclaimer I have never been an EMACS user so I am not sure if my instructions are correct.

---

<div class="post-metadata">

**Author:** ![MarDie](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/mardie/32/54_2.png) [@MarDie](https://fortran-lang.discourse.group/u/MarDie)\
**Post date:** [April 5, 2022, 4:59pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/9 "2022-04-05T16:59:47Z")

</div>

I use geany and for small changes vim

---

<div class="post-metadata">

**Author:** ![gardhor](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gardhor/32/88_2.png) [@gardhor](https://fortran-lang.discourse.group/u/gardhor)\
**Post date:** [April 6, 2022, 6:35am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/10 "2022-04-06T06:35:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![CRquantum](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/crquantum/32/730_2.png) [@CRquantum](https://fortran-lang.discourse.group/u/CRquantum)\
**Post date:** [April 6, 2022, 6:54am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/11 "2022-04-06T06:54:17Z")

</div>

There are series of videos by Lukas Lamm (is he also in this forum?) teaching how to use VS Code + gfortran,

[![](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/4/461275810675d07127adf1f3f5a85bc35210217e.jpeg "VS Code for Fortran Ep.1: Introduction & Installation of Visual Studio Code") ](https://www.youtube.com/watch?v=-X_71WrV63c)

In fact, vscode with the top 4 Fortran extensions at the side bar as in the screenshot shows below, is decent,

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/3/31a97bfa9b93bd77369087f215a4eb3c5b1794e8.jpeg)

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,

> **[Running Intel Fortran in Visual Studio Code instead of Visual Studio IDE](https://community.intel.com/t5/Intel-Fortran-Compiler/Running-Intel-Fortran-in-Visual-Studio-Code-instead-of-Visual/td-p/1174895)**
>
> Perhaps this already been addressed in a previous post, but I am wondering if Intel Fortran runs in Visual Studio Code now? If so, is there a downloadable VSCode extension to do this? And, will VSCode replace Visual Studio 20xx as the standard...

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.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 6, 2022, 7:12am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/12 "2022-04-06T07:12:36Z")

</div>

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](https://github.com/fortran-lang/fortran-lang.org/pull/383/files#r830256046) 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.

---

<div class="post-metadata">

**Author:** ![Sideboard](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/sideboard/32/779_2.png) [@Sideboard](https://fortran-lang.discourse.group/u/Sideboard)\
**Post date:** [April 6, 2022, 7:26am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/13 "2022-04-06T07:26:40Z")

</div>

1. VS Code
2. Sublime Text

---

<div class="post-metadata">

**Author:** ![CRquantum](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/crquantum/32/730_2.png) [@CRquantum](https://fortran-lang.discourse.group/u/CRquantum)\
**Post date:** [April 6, 2022, 7:34am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/14 "2022-04-06T07:34:25Z")

</div>

Thank you @gnikit !

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,

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/3/3e59f7417cadad536754fc32a659c61333658b89.jpeg)

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.

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 6, 2022, 7:44am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/15 "2022-04-06T07:44:13Z")

</div>

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`](https://github.com/hansec/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`](https://github.com/gnikit/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.

 ![Screenshot from 2022-04-06 08-41-44](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/d/dceb9690a47e8f9497fffca01f1f795933fdbb50.png)

- You will get the same hover messages
- `fortls` and `fortran-language-server` have a binary with the same name, it can be a bit confusing but see the docs for the [explanation](https://gnikit.github.io/fortls/README.html#fortls-vs-fortran-language-server)

---

<div class="post-metadata">

**Author:** ![snano](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@snano](https://fortran-lang.discourse.group/u/snano)\
**Post date:** [April 6, 2022, 8:08am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/16 "2022-04-06T08:08:40Z")

</div>

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](http://Anaconda.org), but I could not find fortls.

---

<div class="post-metadata">

**Author:** ![snano](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@snano](https://fortran-lang.discourse.group/u/snano)\
**Post date:** [April 6, 2022, 8:14am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/17 "2022-04-06T08:14:27Z")

</div>

After some tries, I found it: [Fortls :: Anaconda.org](https://anaconda.org/conda-forge/fortls)

> ` conda install -c conda-forge fortls `

---

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [April 6, 2022, 8:17am UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/18 "2022-04-06T08:17:02Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Pap](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/pap/32/1305_2.png) [@Pap](https://fortran-lang.discourse.group/u/Pap)\
**Post date:** [April 6, 2022, 12:07pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/19 "2022-04-06T12:07:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rwmsu](https://avatars.discourse-cdn.com/v4/letter/r/48db29/32.png) [@rwmsu](https://fortran-lang.discourse.group/u/rwmsu)\
**Post date:** [April 6, 2022, 2:26pm UTC](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139/20 "2022-04-06T14:26:48Z")

</div>

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.

[Next page](https://fortran-lang.discourse.group/t/code-editors-ides-used-for-fortran/3139.md?page=2)
