Quantcast

How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Lenin Lee
Hi there,

I want to highlight the matching tag when I put the cursor on the other one.
Is there any plugin or method to do so ?

Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Gary Holloway
There's a matchit plugin that should do what you want.

http://www.vim.org/scripts/script.php?script_id=39

On Dec 3, 9:11 pm, Lenin Lee <[hidden email]> wrote:
> Hi there,
>
> I want to highlight the matching tag when I put the cursor on the other one.
> Is there any plugin or method to do so ?
>
> Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Lenin Lee
I know this plugin, but it only jumps from one tag to its corresponding one, what I want is to highlight the corresponding tag.

Any ideas ?

2009/12/5 Gary <[hidden email]>
There's a matchit plugin that should do what you want.

http://www.vim.org/scripts/script.php?script_id=39

On Dec 3, 9:11 pm, Lenin Lee <[hidden email]> wrote:
> Hi there,
>
> I want to highlight the matching tag when I put the cursor on the other one.
> Is there any plugin or method to do so ?
>
> Thanks

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php



--
初从文,三年不第。遂习武,校场发一矢,中鼓吏,逐之出。后学医,有所成,自撰一良方,服之,卒。

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Tony Mechelynck
On 08/12/09 06:15, Lenin Lee wrote:
> I know this plugin, but it only jumps from one tag to its corresponding
> one, what I want is to highlight the corresponding tag.
>
> Any ideas ?

AFAIK, there isn't (yet), but it ought to be possible to write a
replacement for the matchparen plugin which would highlight (if within
the window) whatever matchit (if installed) would jump to on a % keyhit.
(If matchit is not installed, fall back to the present behaviour.)

Best regards,
Tony.
--
        THEORY
Into love and out again,
        Thus I went and thus I go.
Spare your voice, and hold your pen:
        Well and bitterly I know
All the songs were ever sung,
        All the words were ever said;
Could it be, when I was young,
        Someone dropped me on my head?
                -- Dorothy Parker

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Paul-425
On Sun, Jan 10, 2010 at 05:37:05PM +0100, Tony Mechelynck wrote:
>On 08/12/09 06:15, Lenin Lee wrote:
>>I know this plugin, but it only jumps from one tag to its corresponding
>>one, what I want is to highlight the corresponding tag.

Oops, I missing the original email. Have you tried the matchparen++ plugin?

http://www.vim.org/scripts/script.php?script_id=2059

--

.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Charles Campbell
In reply to this post by Tony Mechelynck
Tony Mechelynck wrote:

> On 08/12/09 06:15, Lenin Lee wrote:
>> I know this plugin, but it only jumps from one tag to its corresponding
>> one, what I want is to highlight the corresponding tag.
>>
>> Any ideas ?
>
> AFAIK, there isn't (yet), but it ought to be possible to write a
> replacement for the matchparen plugin which would highlight (if within
> the window) whatever matchit (if installed) would jump to on a %
> keyhit. (If matchit is not installed, fall back to the present
> behaviour.)
Does  HiMtchBrkt  do what you're wanting?  It only handles () [] {}, not
generic matchparen style tags, though.

You can get <HiMtchBrkt.vim> from

    http://vim.sourceforge.net/scripts/script.php?script_id=1435   (stable)
    http://mysite.verizon.net/astronaut/vim/index.html#HIMTCHBRKT 
(cutting edge)

Regards,
Chip Campbell


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Lenin Lee
In reply to this post by Paul-425
What I really want is to highlight the matching HTML tags.

Though matchparen++ can not solve my problem, it is really a good plugin and thank you for introducing it to me.

2010/1/14 Paul <[hidden email]>
On Sun, Jan 10, 2010 at 05:37:05PM +0100, Tony Mechelynck wrote:
On 08/12/09 06:15, Lenin Lee wrote:
I know this plugin, but it only jumps from one tag to its corresponding
one, what I want is to highlight the corresponding tag.

Oops, I missing the original email. Have you tried the matchparen++ plugin?

http://www.vim.org/scripts/script.php?script_id=2059

--

.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php



--
初从文,三年不第。遂习武,校场发一矢,中鼓吏,逐之出。后学医,有所成,自撰一良方,服之,卒。

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How can Vim highlight the matching tag when I put the cursor on the other one in a pair of tags ?

Lenin Lee
In reply to this post by Charles Campbell
What I really want is to highlight the matching HTML tags.

Thanks anyway.

2010/1/16 Charles Campbell <[hidden email]>
Tony Mechelynck wrote:
On 08/12/09 06:15, Lenin Lee wrote:
I know this plugin, but it only jumps from one tag to its corresponding
one, what I want is to highlight the corresponding tag.

Any ideas ?

AFAIK, there isn't (yet), but it ought to be possible to write a replacement for the matchparen plugin which would highlight (if within the window) whatever matchit (if installed) would jump to on a % keyhit. (If matchit is not installed, fall back to the present behaviour.)

Does  HiMtchBrkt  do what you're wanting?  It only handles () [] {}, not generic matchparen style tags, though.

You can get <HiMtchBrkt.vim> from

  http://vim.sourceforge.net/scripts/script.php?script_id=1435   (stable)
  http://mysite.verizon.net/astronaut/vim/index.html#HIMTCHBRKT  (cutting edge)

Regards,
Chip Campbell


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php



--
初从文,三年不第。遂习武,校场发一矢,中鼓吏,逐之出。后学医,有所成,自撰一良方,服之,卒。

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
Loading...