Running into a strange issue with my vimrc setting where I isolated to these 2 combination of lines if I use BufRead.

e.g.

au BufRead *.py \ set softtabstop=4 \ set shiftwidth=4 

Now if I open a file with .py, I get error:

Error detected while processing BufRead Auto commands for "*.py": E518: Unknown option: set 

This only happens under au BufRead and individually each setting works but not in combination?

3

2 Answers

If you want to use multiple set, separate with |:

au BufRead *.py \ set softtabstop=4 | \ set shiftwidth=4 

Read more :help :bar.

1

please use one set with space separated options:

au BufRead *.py set softtabstop=4 shiftwidth=4 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy