CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Fortran editor for Linux (https://www.cfd-online.com/Forums/main/13992-fortran-editor-linux.html)

Praveen. C August 22, 2007 08:15

Fortran editor for Linux
 
Is there any editor with good support for fortran ? I am looking for an editor which has features to manage a big fortran project with multiple files. In Linux only.

Harish August 22, 2007 15:39

Re: Fortran editor for Linux
 
If you use the KDE environment you can use kdevelop to manage fortran projects.

jinwon park August 22, 2007 15:47

Re: Fortran editor for Linux
 
Now, I am using just the vim editor. It looks very simple and easy to use. However, one needs to memory some commands for the effective use.

Arpiruk August 23, 2007 08:16

Re: Fortran editor for Linux
 
Once you are expert at VIM, no other editor can beat it. But I'm quite lazy and found myself stuck with NEDIT.

It's not a software management but pretty goot at multi-file editing. Syntax hightlight, statistic line and line numbering and other function made it useful in editing and debuging.

andy August 23, 2007 08:38

Re: Fortran editor for Linux
 
Emacs version 22.1 released in June (not the older one that comes with your distribution) is probably the best for most people. In this version a lot of the unconventional stuff has been replaced so that it points-and-clicks like a conventional editor, includes a gui driven interactive debugger plus, of course, the billions of lisp scripts to support indentation, highlighting, commenting, etc... To manage a large project one usually emacs interfaces to separate tools like subversion/cvs , make, etc...


taw August 23, 2007 23:40

Re: Fortran editor for Linux
 
I go with Andy, I don't know the new version, but emacs is the best i know till now, but on debian. They have the tutorial online also, which you can study in few hours. The coloring of the syntaxes, commenting etc can be enabled for fortran itself.

Cheers

Praveen. C August 24, 2007 03:45

Re: Fortran editor for Linux
 
Thanks for all the suggestions. I have used only vim and I am usually happy with it. But now I am working with a huge fortran code. I would like to be able to easily navigate between different subroutines without having to search manually for them. I will try out emacs also.

Steve August 24, 2007 04:59

Re: Fortran editor for Linux
 
One thing worth knowing is the emacs itself has a VI emulator with user-settings for how close to VI it behaves. And you get the graphical benefits of emacs for free (point & click etc).

In emacs, use the command: "viper". (Stands for VI PERil)

andy August 24, 2007 05:03

Re: Fortran editor for Linux
 
In vim you can use tags to jump around. In emacs you can use the speedbar which is usually off by default or tags if you prefer.

If you want a Windows-type integrated environment there is eclipse with the photran extension (or a word something like photran) for Fortran but it does not work 100%. Eclipse works well for Java, OKish for C/C++ but with Fortran support lagging somewhat.

An alternative that is well sorted is the Sun Integrated Development Environment which fully supports java, c/c++ and fortran and in several instances has better programming tools than the gnu ones.


Praveen. C August 24, 2007 12:21

Re: Fortran editor for Linux
 
emacs with speedbar looks interesting. Also taglist with vim/gvim also does similar job. In emacs I havent got indenting etc. to work well for fortran. Is there something I have to enable? Can somebody paste their .emacs settings for fortran?

andy August 24, 2007 15:53

Re: Fortran editor for Linux
 
> In emacs I havent got indenting etc. to work well for fortran. Is there
: something I have to enable?

The only problem I can recall concerned something called freeze which seemed to get triggered by a .F ending.

What problems are you seeing with indentation?

> Can somebody paste their .emacs settings for fortran?

;;Hopefully this turns off the freeze business for .F files

(setq crypt-freeze-vs-fortran nil)


taw August 25, 2007 00:02

Re: Fortran editor for Linux
 
Hi I am not expert on setting environments, some one set it for me & indenting work fine with me as long as the file is named *.f, .F, .F90, .for. etc.

May be look thru this .emacs file, mind you my setting deliberately disabled CVS since it was a bit of annoying to me.

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&

(mouse-wheel-mode t)

(toggle-transient-mark-mode)

(global-font-lock-mode 1)

(custom-set-variables ;; custom-set-variables was added by Custom -- don't edit or cut/paste it!

;; Your init file should contain only one such instance. '(vc-handled-backends (quote (CVS SCCS))))

(custom-set-faces ;; custom-set-faces was added by Custom -- don't edit or cut/paste it!

;; Your init file should contain only one such instance. )

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& &&&

cheers taw

Praveen. C August 27, 2007 07:32

Re: Fortran editor for Linux
 
If I am editing a file ending in .f it should automatically do the indenting. But it does not work. In viper mode indenting works but not fully. For example if I start a do-loop indentation occurs but for "enddo" the indenting is wrong.

andy August 27, 2007 08:38

Re: Fortran editor for Linux
 
It does not know you are going to type end do until you have typed it. If you press the tab after typing end do but before hitting return it will indent.


Praveen. C August 27, 2007 08:57

Re: Fortran editor for Linux
 
Thanks for that information. In vim I dont have to press tab at all. Indentation is fully automatic. As soon as I type enddo it is automatically correctly indented. But in emacs you have to press tab for every indentation.

taw August 27, 2007 21:50

Re: Fortran editor for Linux
 
A comment still if it will help,

Your approach is new to me. I do it as follows. I just type my script, select or highlight it. Then in emacs in the menu bar there will be "Fortran" bar. I select indent region or sub-program etc, may be yours is short, I will try it.

Cheers, TAw


All times are GMT -4. The time now is 02:05.