vim syntax bug

6 views
Skip to first unread message

sergio

unread,
Jan 15, 2011, 1:24:56 PM1/15/11
to vim_use
Hello.

autocmd BufNewFile *.zsh call append( 0, [
\ '#!/bin/zsh',
\ '' ] )

vim highlights last ')' with red background as an error, but there is no
error.

--
sergio.

Charles E Campbell Jr

unread,
Jan 17, 2011, 10:54:20 AM1/17/11
to vim...@googlegroups.com
This occurs due to the continuation. There's a tradeoff involved;
fixing this sort of thing would require a lot of nextgroups and
additional syntax, going away from fast keyword recognition to regular
expression based matches and regions, and a significant increase in size
of syntax/vim.vim, perhaps doubling it. Its not the largest syntax file
(muttrc.vim has that honor), but doubling its size would make it the
largest by far.

Try putting

let g:vimsyn_noerror= 1

in your .vimrc if this bothers you overmuch.

Regards,
Chip Campbell

sergio

unread,
Jan 17, 2011, 11:48:54 AM1/17/11
to vim...@googlegroups.com
On 01/17/2011 06:54 PM, Charles E Campbell Jr wrote:

> This occurs due to the continuation. There's a tradeoff involved;

Thank you for explanation.

--
sergio.

Reply all
Reply to author
Forward
0 new messages