riv.vim
riv.vim copied to clipboard
sync: line continuations pattern specified twice
Opening an rst file with vim gives the following error:
Messages maintainer: Bram Moolenaar <[email protected]>
"test.rst" 0L, 0C
Error detected while processing /usr/share/vim/vim74/syntax/vim.vim:
line 748:
E403: syntax sync: line continuations pattern specified twice
Press ENTER or type command to continue
From the message above, seems it's the vim's syntax file's error.
Is there any code directives (.. code:: xxx
)in your rst file.
Can you reinstall vim to see if the problem still exists?
I've reinstalled vim to no effect. The message is shown even when opening a new, empty rst file. I noticed that, however with the older version available on vim.org the problem seems to go away. Note, that I'm using archlinux and it has two different packages for gvim and vim. Using the vim package works, but the gvim one drops the error message. It may be a bug in that specific package.
From the readme of the vim.org version:
:Author: Rykka G.F
:Update: 2012-10-16
:Version: 0.74
:Github: https://github.com/Rykka/riv.vim
That's right , I previously using archlinux, And have met some issues like this.
I will check the older version of riv.vim
's syntax file from vim.org, Thanks~
The same issue happens with the vim installation on Ubuntu 14.04. I found out that the vim-runtime package on Ubuntu is bundled with an older version of the syntax/rst.vim
file from 2013 by Nicolai Weibull. So, the syntax rules for restructuredText files are loaded twice.
-
<vim-runtimepath>/syntax/rst.vim
-
~/.vim/after/syntax/rst.vim
The script ~/.vim/syntax/rst.vim
won't be parsed as it is guarded by the b:current_syntax
variable.
My solution: I deleted the (deprecated) /usr/share/vim/vim74/syntax/rst.vim
to "solve" the problem and get rid of the error message.
@Rykka : A better solution working for everyone might be a guard in the after/syntax/rst.vim
file. However, such a guard needs to be activated in syntax/rst.vim
. I do not know if that leads to problems elsewhere...?
@mdrohmann. Thanks, You are right. can you paste the older version here or in a gist?
@Rykka Here is a gist of the old syntax file on Ubuntu 14.04.
I hit the same error:
Error detected while processing /usr/share/vim/vim74/syntax/vim.vim:
just started appearing as a problem for me because I was restricting riv.vim's loading via vim-plug's for
option (which lazy-loads based on via filetype; eg Plug 'Rykka/riv.vim', { 'for': 'rst' }
). Removing this restriction stops the error, but I looked into what was causing it. See the linked issue at https://github.com/junegunn/vim-plug/issues/410.
May or may not be the same cause for the original issue, but either way, after/syntax/rst.vim
was being loaded twice in my case.
@davidjb nice =]