Kamaraju Kusumanchi wrote:
On Wednesday 27 December 2006 02:06, A.J.Mechelynck wrote:
Kamaraju Kusumanchi wrote:
Hi
    I have two vim installations. One is on Debian Etch, vim 7.0-122. The
other one is Redhat 7.3, vim 7.0. On Debian I am using the distribution
provided vim packages. On Redhat, I compiled vim 7.0 myself. Both
machines have the same .vim, .vimrc, .gvimrc etc.,

Now I have a .F90 file whose contents looks like

function name(args)
...
end function

Let's say my cursor is on f of function.
On debian, If I enter %, it goes to "end function" line.
On Redhat, If I enter %, it goes to the end of that line. That is on
Redhat machine, it sees match between (, ) instead of match between
function, end function.

My configuration files are temporarily hosted at
http://kamaraju.googlepages.com/vim_problems

Please let me know how to get the correct behavior on the Redhat machine
as well...

raju
see ":help matchit-install"

As an alternative to copying the files, you may want to add a pair of
softlinks (untested):

        ~/.vim/plugin/matchit.vim -> 
/usr/local/share/vim/vim70/macros/matchit.vim
        ~/.vim/doc/matchit.txt -> /usr/local/share/vim/vim70/macros/matchit.txt


Best regards,
Tony.

Thanks. But is there any way to do this without populating the ~/.vim directory? On Debian it works by default. Why does not it work like that on Redhat as well?
BTW, on Redhat machine when I did
:so ~/myroot/share/vim/vim70/macros/matchit.vim then % works fine. I wonder how it is automatically sourced in Debian and why it was not on Redhat. On both machines VIMRUNTIME is same. i.e. on Debian, :echo $VIMRUNTIME results in /usr/share/vim/vim70 and on Redhat it points to ~/myroot/share/vim/vim70. So where is the difference coming from? Do I need to do something while compiling vim?

thanks
raju


In a standard Vim installation (as downloaded from the vim.org site) matchit is not installed by default, IIUC for upwards compatibility reasons. Now Debian is known for making changes to the programs they install, to such an extent that, for instance, they have been refused the right to distribute the SeaMonkey browser (as modified by Debian) under its original name.

If on Debian it works "out of the box", then I guess Debian made nonstandard changes, possibly by moving matchit.vim from $VIMRUNTIME/macros to $VIMRUNTIME/plugins and matchit.txt from $VIMRUNTIME/macros to $VIMRUNTIME/doc. Bram could have done that, but I suppose it would have broken the use of Vim for users who did _not_ want to use matchit.

And no, you shouldn't do anything before compiling Vim. If the softlinks I gave you work, you won't need to change anything until Vim 7.1 comes out: they will automagically pick any changes made to those files (if you download their new versions) in the lifetime of the 7.0 release. You might just have to run the ":helptags" command in ~/.vim/doc if matchit.txt is modified. However, I don't expect changes to either of these files in any foreseeable future.


Best regards,
Tony.

Reply via email to