Using autocommand to change scrolloff but it is changed in all buffers

2013-01-11 Thread skeept
Hi, I have the following autocommand set readonly files to autoread autocmd BufRead,BufNewFile * if readonly == 1 | setlocal autoread so=0 \ sbo+=ver,hor | endif I usually set so=2 in my vimrc. After I use vim help the value of so is changed in all buffers to be 0. I am sure that

Re: Using autocommand to change scrolloff but it is changed in all buffers

2013-01-11 Thread Andy Wokula
Am 11.01.2013 19:54, schrieb skeept: Hi, I have the following autocommand set readonly files to autoread autocmd BufRead,BufNewFile * if readonly == 1 | setlocal autoread so=0 \ sbo+=ver,hor | endif I usually set so=2 in my vimrc. After I use vim help the value of so is

Re: Using autocommand to change scrolloff but it is changed in all buffers

2013-01-11 Thread skeept
'scrolloff' is a global option, :setlocal can be used to change a global OK, I understand why this is the case now. I will remove that setting from the autocommand. Thank you. Jorge. -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text