junegunn / goyo.vim

:tulip: Distraction-free writing in Vim
MIT License
4.49k stars 115 forks source link

[EVP_E477] No ! allowed #150

Closed jwmwalrus closed 7 years ago

jwmwalrus commented 7 years ago

Hi.

I get syntax error "[EVP_E477] No ! allowed" in my .vimrc, using the following configuration:

    """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
    " goyo/limelight
    function! s:goyo_enter()
        if has('gui_running')
            set linespace=7
            Limelight
        endif
    endfunction

    function! s:goyo_leave()
        if has('gui_running')
            set linespace=0
            Limelight!
        endif
    endfunction

    autocmd! User GoyoEnter nested call <SID>goyo_enter()
    autocmd! User GoyoLeave nested call <SID>goyo_leave()

The plugin seems to work properly, but the syntax error breaks ":source ~/.vimrc".

Is there an alternative to the "Limelight!" command that doesn't use the ! operator?

I'm using vim 8.0.0197-3 (as provided by Debian Testing).

junegunn commented 7 years ago

Are you sure that the error is from the above snippet? I copy-pasted your code on my .vimrc, but I can't reproduce the problem.

jwmwalrus commented 7 years ago

The syntax error is spotted by the vimL linter.

Commenting the "Limelight!" line in the second function makes the error go away, so it's definitely related.

After adding EVP_E477 to syntastic's list of quiet messages, I can source ~/.vimrc without problem. Maybe the linter is being too strict?

junegunn commented 7 years ago

Well, I don't think it even makes sense.