At the moment I'm writing, I removed the matchit
plugin and the %
works well, making the cursor jump from a (
, [
, or {
to the corresponding closing character and vice versa.
Now I installed matchit
again, adding Plugin 'vim-scripts/matchit.zip'
to my .vimrc
and then running Vundle's :PluginInstall
. Having done so, I can now jump back and forth from subroutine
to end subroutine
in my .f90
files and so on (and I can do it with .cpp
and so on).
But I cannot make this jumps with parenthesis and brackets and other "standard" pairs.
I have no idea what could be the reason of such strange behavior in Vim. I hope the following observations can be useful for you to help me.
- Wherever I press
%
(to jump between a standard or non standard pair, or on an empty line with no reason), then I cannot use it anymore, as well as the cursor remains in the buffer related to a.f90
file. - If I move to another buffer/window related to a NON
.f90
file (by:n<CR>
,:N<CR>
,<C-W><C-W>
and so on, or simply:help<CR>
) and press%
at least once (to jump between ... as before), then I can go back to a.f90
buffer/window and use%
with standard pairs once (just once!) again. - Jumping between new pairs (
IF
,DO
, and so on) is not affected.
Maybe I should underline that I got the feeling that this happens only with Fortran files (.f90
and .f95
), since it doesn't happen with help pages (.txt
) nor with .cpp
files.
vim-script/matchit.zip
plugin you're talking about but in my.vimrc
I haveruntime macros/matchit.vim
which enables the defaut matchit plugin and%
works on brackets as well as onsubroutine
maybe you should try that.:h matchit.txt
and especially:h matchit-debug
. The Github mirror is older then the distributed version with Vim.