Questions tagged «setlocal»

2
“ set”命令仅影响活动缓冲区吗?
我在vim中有两个缓冲区: :ls 1 %a ".vimrc" line 1 2 #h "script.sh" line 1 Press ENTER or type command to continue 如上所示,我在第一个缓冲区。现在,如果我执行该:set softtabstop=16命令,那么我希望它会影响两个缓冲区。但是,情况并非如此-虽然sts第一个缓冲区的值确实已更改,并且Tab键插入了四个制表符(ts=4),但对于第二个缓冲区,该sts值仍为4: :ls 1 #h + ".vimrc" line 1 2 %a + "script.sh" line 1 softtabstop=4 Press ENTER or type command to continue 为什么会这样?我认为这set会影响所有缓冲区,而setlocal只会影响活动缓冲区。
14 set  setlocal 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.