How can I fix indent problems when using jEdit for f90 programming on Win7?

  • Thread starter Thread starter solarblast
  • Start date Start date
Click For Summary
SUMMARY

The forum discussion addresses indent issues encountered when using jEdit for Fortran 90 (f90) programming on Windows 7. Users report problems with mixed tabs and spaces leading to misalignment in code. Recommendations include configuring jEdit to replace tabs with spaces and considering alternative editors like Crimson Editor and Notepad++. The consensus emphasizes avoiding tabs altogether to maintain consistent formatting.

PREREQUISITES
  • Familiarity with Fortran 90 programming syntax
  • Basic understanding of text editor configurations
  • Knowledge of Windows 7 operating system
  • Experience with code formatting best practices
NEXT STEPS
  • Configure jEdit to replace tabs with spaces for f90 coding
  • Explore the features of Crimson Editor for Fortran programming
  • Learn about Notepad++ settings for handling indentation
  • Research best practices for code formatting in Fortran 90
USEFUL FOR

Fortran developers, software engineers working with legacy code, and anyone seeking to improve code formatting and readability in text editors.

solarblast
Messages
146
Reaction score
2
I've been using jEdit for writing f90 programs. Win7. Although jEdit has been helpful, I see that with f90 it has limited indent features, and sometimes when I print I get odd indents. When moving the cursor on a line, sometimes odd things happen. For example, it appears that the cursor takes tab jumps. Tabs may be mixed among blanks spaces. Another editor for f90? Away to control it for f90?

Here's a small example of indent problems.

integer :: j
real :: a
a=3.0
do j=1,3
write(*,*) j + a
end do

There is no clear way to line these up. Unseen tabs may be the problem in jEdit.
 
Technology news on Phys.org
Well, that didn't quite work. Consider _ as a space.

integer :: j
real :: a
__a=3.0
__do j=1,3
_____write(*,*) j + a
__end do

I'd like to see:
__integer :: j
__real :: a
__a=3.0
__do j=1,3
_____write(*,*) j + a
__end do
 
I stopped using jEdit a looooong time ago.

One thing that is frown upon by many of us is the use of tabs, in the first place.

So, see if you can go to Options or Settings and look for a way to emulate tabs with spaces...I think there might be an option where you tell the editor that every time you press the tab key, it should use a certain number (typically 4) of spaces, instead.

Whenever I inherit a source, the first thing I do is a "search and replace" and get rid of the tabs...yes, it ends up misaligned and so I fix it.

Other nice editors are Crimson and Notepad++.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
5K
Replies
15
Views
5K
  • · Replies 5 ·
Replies
5
Views
6K
Replies
29
Views
6K
  • · Replies 9 ·
Replies
9
Views
3K
Replies
81
Views
12K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
19K
  • · Replies 1 ·
Replies
1
Views
5K