I don't know if this is possible at all, but still ... no harm in asking.
I'm using Vim to edit fortran files, old and new (.for and .f90). I'm trying to get completion, something alike Visual Studio's, so that when I have several subroutines defined in a file:
subroutine init ( ibc, nquad, ul, ur, xl, xr )
subroutine output ( f, ibc, indx, nsub, nu, ul, ur, xn )
subroutine phi ( il, x, phii, phiix, xleft, xrite )
and I call them somewhere:
call init(<cursor is here>
I get the list of arguments, so I don't have to remember them. If I understood right VS calls this "Intellisense".
Is something similar available in Vim (GVim72) and if it is, how to get it to work ? Any tips appreciated.
ldigas edit: I'd also be satisfied if I could just get the declaration line, as to say, when I type:
call init(<cursor is here>
and press completion key, Vim punches in the whole line, e.g.
call init( ibc, nquad, ul, ur, xl, xr )
ldigas edit2: 2 answers withdrawn so far ... interesting.
The closest one should be vim intellisense. Unfortunately, it does not support Fortran yet...
partial answer:
Okey, I got the first part:
Vim's whole line completion is called by
<Ctrl-X, Ctrl-L>
(if it is in a same file, which, btw, very often it isn't)
Unfortunatelly, if a subroutine declaration looks like
call assemble ( adiag, aleft, arite, f, h, indx, nl, node, nu, nquad, &
nsub, ul, ur, xn, xquad )
(where "&" is a continuation mark) that way won't work. Does anyone (come on you scripting vimmers) know of a way to avoid this behaviour ?
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