Closed aitzkora closed 4 years ago
not sure I understand. Where is your cursor, when you hit %
? And where would you like the cursor to be?
I'm not familiar with fortran, but ftplugin/fortran.vim
doesn't seem to define #if
-#endif
pair in b:match_words
. Maybe you need to update b:match_words
by yourself. (See :help b:match_words
.)
@chrisbra : it would be nice that the cursor goes to the 'else' keywords. #if and #endif creates some interferences to navigate into control structures @k-takata : it was the sort of information I were looking for.... It hope defining b:match_words enrich the keywords not cancelling the previous definition
@k-takata : I tried let b:match_words = '\<#if>:\<#endif>,'. b:match_words on command line but it seems not to do the job. Have you a example for another langage, how to append some keywords ? And another question, where I can put these modifications not to modify the system configuration ? thanks by advance if you know the answers
So where was your cursor? Can you try the example from the b:match_words
from the C ftplugin. It looks similar enough to give this a try. Also, are you sure, that matchit is actually run?
@aitzkora if we figure this out correctly, we can add those examples to the official vim fortran ftplugin.
@chrisba : yes the problem is clearly not matchit but fortran ftplugin. You can close this issue, i will post an issue on ftplugin fortran thanks
doing manually a
:let b:match_words = b:match_words .'^\s*#\s*if(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>'
in my fortran file window solve the problem
Match-up includes something similar for fortran
thanks, I dit not know this package, I will give a try!
Hi, I have a problem with matching fortran keywords when I used pragma compilation directives. If we mixing fortran and pagma compilation directive, matching is lost... for example, going on the first if an pressing '%'
makes the cursor go on the first '#endif'. Do you know how to correct that. Could I use a regexp to take that case into account. If you have any ideas... Bests regards marc