Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error when opening file #139

Open
farzadmf opened this issue Sep 28, 2020 · 10 comments
Open

Getting error when opening file #139

farzadmf opened this issue Sep 28, 2020 · 10 comments
Labels

Comments

@farzadmf
Copy link

Hi, I'm using neovim, and when opening a specific file, I'm getting this error:

Error detected while processing function css_color#init[10]..css_color#enable:
line    3:
E12: Command not allowed from exrc/vimrc in current dir or tag search: ^Iaugroup CSSColor
line    4:
E12: Command not allowed from exrc/vimrc in current dir or tag search: ^I^Iautocmd! * <buffer>
line    6:
E12: Command not allowed from exrc/vimrc in current dir or tag search: ^I^I^Iautocmd CursorMoved,CursorMovedI <buffer> call s:parse_screen()
line   12:
E12: Command not allowed from exrc/vimrc in current dir or tag search: ^I^Iautocmd ColorScheme <buffer> call css_color#reinit()
line   13:
E12: Command not allowed from exrc/vimrc in current dir or tag search: ^Iaugroup END

To be more specific, I'm using byobu, and I'm doing nvim $( which byobu ) to open the file. The target file is /usr/bin/byobu, which is a "read-only" file.

I tried copying the file to a directory owned by me, but the error still happens. It seems that the issue is only with that specific file (which is a shell script), but I can't replicate it with any other file (even a shell script).

Any ideas what could be the issue here?

Thank you

@ap
Copy link
Owner

ap commented Sep 28, 2020

What does :set secure? modeline? say

@ap
Copy link
Owner

ap commented Sep 28, 2020

(Mainly I’m trying to see whether this is neovim #9881. Personally I haven’t had luck reproducing the issue based on the description of that bug (and the underlying Vim 8.1 bug – caused by vim/vim@82e8c92 and then fixed in vim/vim@916a818).

Either way, it seems that secure is getting set somehow.)

@farzadmf
Copy link
Author

Thank you @ap for your reply, the output of :set secure? modeline? is this:

nosecure
  modeline

And I'm sorry about the bug description; I know it's super specific, but that's the only situation I saw the message

@ap
Copy link
Owner

ap commented Sep 29, 2020

Huh! That is after you get that error message? Because it acts as if secure had been set… but that output says it wasn’t actually set?

@farzadmf
Copy link
Author

Apparently, that's the case 😮 😕

@twidxuga
Copy link

I have the exact same error. Was able to reproduce it with a simple file (test.cfg) containing the line

# vi:syntax=cfg

My secure and modeline variables are the same as @farzadmf's.

@farzadmf
Copy link
Author

@twidxuga pointed out a good thing; I checked the file I'm opening and it has this at the end:

# vi: syntax=sh ts=4 noexpandtab

@ap
Copy link
Owner

ap commented Oct 23, 2020

Was able to reproduce it with a simple file containing the line

Thank you for that! I can reproduce it that way too.

@ap ap added the bug label Oct 23, 2020
@asakura42
Copy link

asakura42 commented Jul 11, 2021

Same with # vi: syntax=sh

@adamhotep
Copy link

adamhotep commented Aug 27, 2023

I also have this issue and the same nosecure modeline output to that query.

The solution is to change syntax to filetype, e.g. # vi: filetype=sh

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

No branches or pull requests

5 participants