xcompact3d / x3d2

https://xcompact3d.github.io/x3d2
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Change all indentation from 3 spaces to 2 using findent #80

Closed JamieJQuinn closed 5 months ago

JamieJQuinn commented 5 months ago

Used pip-installed findent 4.3.1 to change all indentation from 3 spaces to 2 using the following fish command:

for f in (find . -name '*.f90'); findent -i2 -I2 < $f > $f.temp; mv $f.temp $f; end
Nanoseb commented 5 months ago

Used pip-installed findent 4.3.1 to change all indentation from 3 spaces to 2 using the following fish command:

for f in (find . -name '*.f90'); findent -i2 -I2 < $f > $f.temp; mv $f.temp $f; end

I would add

semi-h commented 5 months ago

Is there any setting for alignment for multi-line assignments and for multi-line variable declarations?

Nanoseb commented 5 months ago

Is there any setting for alignment for multi-line assignments and for multi-line variable declarations?

no, unfortunately I haven't seen anything about that in the help page

Nanoseb commented 5 months ago

Because the main limitation of findent is line continuation after =, :: and :. I wrote a small script to handle only these. It is to be used on findent output.

findent < in.f90 | script/indent_continuation.py > out.f90
Nanoseb commented 5 months ago

using fprettify instead see #81