我发现vim有一个奇怪的问题,我似乎很难解决:
[root@localhost .vim]# vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 10 2014 06:55:55)
Included patches: 1-160
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Huge version without GUI. Features included (+) or not (-):
只是在这里以root用户身份在VM上做些混乱...我在
vim
中安装了yum
,它与我的配置文件配合使用非常好...唯一的是我看不懂大多数Vim文档。我什至尝试将其添加到
.vimrc
:augroup gzip
autocmd!
autocmd BufReadPre,FileReadPre *.gz set bin
autocmd BufReadPost,FileReadPost *.gz '[,']!gunzip
autocmd BufReadPost,FileReadPost *.gz set nobin
autocmd BufReadPost,FileReadPost *.gz execute ":doautocmd BufReadPost " . expand("%:r")
autocmd BufWritePost,FileWritePost *.gz !mv <afile> <afile>:r
autocmd BufWritePost,FileWritePost *.gz !gzip <afile>:r
autocmd FileAppendPre *.gz !gunzip <afile>
autocmd FileAppendPre *.gz !mv <afile>:r <afile>
autocmd FileAppendPost *.gz !mv <afile> <afile>:r
autocmd FileAppendPost *.gz !gzip <afile>:r
augroup END
它没有修复它,甚至没有改变行为,我的想法是这些autocmds已经默认设置为开始。
这件事发生在任何人身上吗?我什至以root用户身份运行它,所以我真的不明白为什么某些特定的
options.txt.gz
文件甚至是只读的。现在,我确实必须承认,如果我实际上登录到自己的用户帐户而不是root用户,那么一切似乎都可以正常工作。所以我想这仍然可以很好地提醒您不要以root用户身份执行所有操作...
最佳答案
常见问题Can I use compressed versions of the help files?中对此进行了介绍。
顺便说一句:helpgrep在CentOS上工作吗?如果不是,您可能要考虑在Cent OS上打开错误报告,并请求不要压缩帮助文件。