Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

vim reports "Invalid expression" in syntax/sls.vim #49

Open
cboltz opened this issue Apr 2, 2021 · 4 comments
Open

vim reports "Invalid expression" in syntax/sls.vim #49

cboltz opened this issue Apr 2, 2021 · 4 comments

Comments

@cboltz
Copy link

cboltz commented Apr 2, 2021

I'm using vim-8.2.2607.

When editing a sls file, vim complains about the following "Invalid expression" on startup:

# vi whatever.sls
Error detected while processing /etc/vimrc[42]../usr/share/vim/vim82/syntax/syntax.vim[42]..BufRead Autocommands for "*.sls"..function DetectSls[5]..FileType Autocommands for "*"..Syntax Autocommands for "*"..function <SNR>3_SynSet[25]..script /home/cb/.vim/syntax/sls.vim:
line   67:
E15: Invalid expression: {
line   68:
E10: \ should be followed by /, ? or &
line   69:
E10: \ should be followed by /, ? or &
Press ENTER or type command to continue

Can you please fix this?

@dewingok
Copy link
Contributor

dewingok commented Apr 5, 2021

Unable to reproduce on my machines (macOS 10.15 w/ vim 8.2.2650 or Ubuntu 20.10 w/ vim 8.2.0716). Can you expand on how you have have Vim installed? Maybe share your relevant parts of your vimrc?

I've seen similar issues when only a vim-minimal package is installed.

@cboltz
Copy link
Author

cboltz commented Apr 6, 2021

I use vim 8.2.2607 on openSUSE Tumbleweed. I also have the vim-data package installed, so it's not a minimal vim install.

IIRC I first noticed the problem a month or two ago, so it might be introduced by a vim update or by an update of a distro-packaged vim file.

I installed salt-vim in 2017, and IIRC didn't update it since then.

Regarding vimrc - I load sls.vim via symlinks in the ftdetect, ftplugin and syntax directories in ~/.vim:

cb@tux:~/.vim> find -type l -ls |grep sls
... lrwxrwxrwx   1 ... Nov 13  2017 ./ftdetect/sls.vim -> ../__DOWNLOAD/salt-vim/ftdetect/sls.vim
... lrwxrwxrwx   1 ... Nov 13  2017 ./ftplugin/sls.vim -> ../__DOWNLOAD/salt-vim/ftplugin/sls.vim
... lrwxrwxrwx   1 ... Nov 13  2017 ./syntax/sls.vim -> ../__DOWNLOAD/salt-vim/syntax/sls.vim

and additionally have in my .vimrc (not sure if it's needed or if it predates installing salt-vim)

autocmd BufNewFile,BufRead /*.sls set expandtab

@dewingok
Copy link
Contributor

dewingok commented Apr 6, 2021

Your autocmd line looks problematic. Comment it out or try:

autocmd FileType sls setlocal expandtab

@cboltz
Copy link
Author

cboltz commented Apr 6, 2021

Tried that, and even moved away ~/.vimrc. Unfortunately I still get the same error message.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants