On 9/23/06, Kim Schulz <[EMAIL PROTECTED]> wrote:
On Fri, 22 Sep 2006 23:50:43 +0300
"Yakov Lerner" <[EMAIL PROTECTED]> wrote:

> On 9/22/06, Kim Schulz <[EMAIL PROTECTED]> wrote:
> > Hi
> > Is there any way to get vim to show the line where the matching
> > start bracket is placed (or the line above if line only contains
> > bracket) whenever a closing bracket is pressed.
> > e.g.,
> > if( foo == bar )
> > {
> >         bla bla
> > }
> > should show "if( foo == bar ) {" when the } is inserted.
> >
> > Emacs has this feature and I think that it is quite useful when
> > programming, and would love to have it in Vim.
> > I am not looking for showmatch, and dont want to jump to the line -
> > i simply want a preview at the bottom of the script.
> >
> > If this is not possible directly in Vim, I an planning to write a
> > script for this - any ideas are welcome.
>
> The patch to $VIMRUNTIME/plugin/matchparen.vim, attached,
> shows the line number of the matching paren on the bottom line.
> It's basically a demonstration of how easy it's doable with
> matchparen.vim.
>
> If you want to show it differently, this gives you a starting place.
> Look into matchparen.vim, just search two places with 3match, that's
> the place.


looks nice, except that I cant see the output anywhere. I have
matchparen enabled and the file is patched.
can it be because I have modified my statusline ?

It's most probably because some other plugin's echos
overwrites messages from patched matchparen.
To see how the output looks, try this:

   vim -u NONE -c 'set nocp|so matchparen.vim' yourfile

To track down which plugin overwrites these echos, try to
disable your personal plugins in your ~/.vim/plugin one-by-one
(by renaming them to extension other than .vim)

Yakov

Reply via email to