简体   繁体   English

设置在文件中工作,但不在.vimrc中

[英]Set working in file but not in .vimrc

When I put set scroll=10 in my .vimrc it does not work, but it does work when I enter the command in command mode. 当我在我的.vimrc放置set scroll=10时它不起作用,但是当我在命令模式下输入命令时它确实有效。

I have many other commands in my .vimrc , what reason could there be for this set to not be getting through? 我的.vimrc有很多其他命令,这个set有什么理由不能通过? It is the last line in my .vimrc . 这是我.vimrc的最后一行。

:verbose set scroll?

should tell you which plugin script has last modified that option. 应该告诉你哪个插件脚本最后修改了该选项。 If you don't find the culprit this way, you could workaround by setting it at the last possible moment by putting this in your ~/.vimrc 如果你没有找到这种方式的罪魁祸首,你可以通过将它放在~/.vimrc中的最后一刻设置它来解决问题

:autocmd VimEnter * set scroll=10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM