Luc Hermitte (talk | contribs) m (Added to LanguageSpecific Category) |
(Change <tt> to <code>, perhaps also minor tweak.) |
||
(7 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{TipImported |
||
− | {{review}} |
||
− | {{Tip |
||
|id=449 |
|id=449 |
||
+ | |previous=446 |
||
− | |title=FORTRAN highlighting problems |
||
+ | |next=450 |
||
− | |created= |
+ | |created=2003 |
|complexity=basic |
|complexity=basic |
||
|author=Fabien Bouleau |
|author=Fabien Bouleau |
||
|version=6.0 |
|version=6.0 |
||
|rating=4/4 |
|rating=4/4 |
||
⚫ | |||
− | |text= |
||
+ | |category2=Syntax |
||
− | Sometimes the FORTRAN syntax file doesn't set the correct source form. |
||
− | |||
− | So if you want to choose it by yourself, add the following line in your vimrc file: |
||
⚫ | |||
− | |||
− | The other way to do this is to change the file extension (F77/F90/F95), but it might be a long and/or hazardous work for big projects... |
||
}} |
}} |
||
+ | Sometimes the Fortran syntax files do not set the correct source form which can cause issues with highlighting. In order to fix this issue a user may wish to set the source manually for the <code>.for</code> extension. This can be done by adding the following to the .vimrc file: |
||
+ | <pre> |
||
⚫ | |||
⚫ | |||
− | This one placed before "syntax on" works better: |
||
+ | </pre> |
||
− | au BufRead *.for let b:fortran_fixed_source=1 |
||
− | |||
− | FB |
||
− | |||
− | syrion--AT--freesbee.fr |
||
− | , March 26, 2003 5:50 |
||
− | ---- |
||
− | You can also add the following line to a source file: |
||
− | C vim:set ft=fortran: |
||
− | |||
− | |||
− | '''Anonymous''' |
||
− | , March 26, 2003 23:34 |
||
− | ---- |
||
− | <!-- parsed by vimtips.py in 0.592675 seconds--> |
||
⚫ | |||
− | [[Category:Syntax]] |
||
⚫ |
Latest revision as of 05:31, 13 July 2012
Tip 449 Printable Monobook Previous Next
created 2003 · complexity basic · author Fabien Bouleau · version 6.0
Sometimes the Fortran syntax files do not set the correct source form which can cause issues with highlighting. In order to fix this issue a user may wish to set the source manually for the .for
extension. This can be done by adding the following to the .vimrc file:
au BufRead,BufNewFile *.for let b:fortran_fixed_source=1