I am using vim
to edit a fortran 90 file. The length of a code line exceeds the 73-character column limit:
print*, &
"Not sufficiently large neighbours list in dynstillweb, increase max_n"
The problem is that vim not only marks as red the exceeding characters (say, se max_n"
), but also the rest of the code instead of the usual white, yellow, and blue colors which make easier reading the code. Is there any command to insert in the .vimrc
file to tell vim to increase the character limit and hence avoid the massive red marking?
Thanks!
The issue is that vim assumes a fixed source form by default. You need to add the following to your .vimrc
:
let fortran_free_source=1
Here is an excerpt from :help fortran.vim
:
Fortran code can be in either fixed or free source form. Note that the syntax highlighting will not be correct if the form is incorrectly set.
When you create a new fortran file, the syntax script assumes fixed source form. If you always use free source form, then
:let fortran_free_source=1
in your .vimrc prior to the :syntax on command. If you always use fixed source form, then
:let fortran_fixed_source=1
in your.vimrc
prior to the:syntax on
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With