Vim: Showmatch issue with curly braces

Created on 1 Oct 2015  路  4Comments  路  Source: vim/vim

I've been writing some django templates which contains a lot of {{ }} structures. I have showmatch option set and it annoys me that when I'm typing the two consecutive closing curly braces }} quickly than the second brace is ignored. It's working fine with (()) <<>> or [[]] pairs, but with {{}} the second bracket is ignored when it's typed in under _matchtime_ interval.

runtime

Most helpful comment

Reopening as I've encountered it again.
It's probably a bug in HTML filetype indent.

Steps to reproduce:
.vimrc:

filetype indent on
set showmatch
set showcmd

a.html:

<head>

TYPE: `{{}}` quickly, the second `}` won't be typed in.

All 4 comments

Sorry, it was probably caused by some of the plugins I had installed before. I cannot replicate the behaviour now.

Reopening as I've encountered it again.
It's probably a bug in HTML filetype indent.

Steps to reproduce:
.vimrc:

filetype indent on
set showmatch
set showcmd

a.html:

<head>

TYPE: `{{}}` quickly, the second `}` won't be typed in.

It looks like HTML indent plugin is switching to normal mode when first } is typed and the second } is not interpreted in insert but in normal mode:

In indent/html.vim (line 964), the switch to normal mode (removing it fixes the issue)

  if curtext !~ '^\s*<'
->    normal! ^
    let stack = synstack(v:lnum, col('.'))  " assumes there are no tabs

Thank you! This has been bugging me so much these past few months...

FYI it's now on line 959.

Unfortunately, for me commenting out that line (which is line 901 in my older version) does not solve the issue, so I'll just have to live without showmatch.

Was this page helpful?
0 / 5 - 0 ratings