On 15/06/12 02:09, andy richer wrote:


On Thu, Jun 14, 2012 at 4:06 PM, Tony Mechelynck
<[email protected] <mailto:[email protected]>> wrote:


    Normally if the cursor is on one of {}[]() its mate (if inside the
    current window) is highlighted automatically; this is contingent on
    the matchparen.vim plugin (which is normally installed as
    $VIMRUNTIME/plugin/matchparen.__vim)

I wonder where these two underscores come from; I didn't type them.


    Another possibility, with the cursor anywhere, would be to use
    visual object selection: for instance

            va{



    See
            :help a(
            :help i(
    etc.

    If the start and end markers you want to see are too far away from
    each other to be visible at one time, I suppose you had better use %


    Best regards,
    Tony.


Hi Tony,

I searched in "http://www.vim.org/scripts/index.php"; and can not find
matchparen.vim but I found matchparen++.vim.   I download it to
~andy/.vim/plugin.  I added   source ~andy/.vim/plugin/matchparen++.vim
   in .vimrc .
But when I open a new file, clicking once on { did not highlight
matching } .

Thanks for your help in advance.
Andy Richer

I don't know about matchparen++ but matchparen.vim ought to have been installed together with Vim, unless you are using a very very very obsolete version. IIUC it was added in version 7.0, released more than 6 years ago. It ought to be listed in the output of

        :scriptnames

; and

        :version

will tell you which version of Vim you are running, and if it's a Tiny, Small, Normal, Big or Huge build (the larger the more features of course: if it's Tiny or Small autocommands are not supported).

However, this plugin, even if present, does nothing if any of the following are met:

(1) You are using a feature-poor version of Vim with no support for the CursorMoved autocommand. To test this, type

        :echo exists('##CursorMoved')

If the answer is nonzero (normally 1), the event is supported.
If it is zero, you need a more powerful version of Vim.

(2) 'compatible' is set. Try

        :set cp?

If it answers

nocompatible

it's OK.

(3) You already have a vimrc, and it disables this plugin. Search it for "loaded_matchparen" and for "noloadplugin" (without the quotes). If you find neither of them, it's OK.

(4) You are starting Vim with plugins disabled, by having either "-u NONE" or "--noplugin" (with no quotes) on the command line. I don't think this is the case but I'm listing it for completeness.


Best regards,
Tony.
--
Once, adv.:
        Enough.
                -- Ambrose Bierce, "The Devil's Dictionary"

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to