For C or C ++, [{ or ]} can be used in vim to jump to the beginning or end of a code block. Is there a similar shortcut to go for code block between if and endif in vim for Fortran?
[{
]}
vim
if
endif
The problem is related to not-so-well-formatted code, including many nested if's , which makes reading difficult. Any solutions for such a case?
if's
The built-in, but disabled by default matchit plugin should help you with this.
Add this line to your vimrc :
vimrc
runtime macros/matchit.vim
After restarting Vim, you can press % to switch from if to endif and vice versa.
%