Linux CentOS 7&x27;s vim can';无法打开帮助(以root用户身份运行时),因为它可以';t处理gzip帮助文件

Linux CentOS 7&x27;s vim can';无法打开帮助(以root用户身份运行时),因为它可以';t处理gzip帮助文件,linux,vim,Linux,Vim,我发现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 with

我发现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 (-):
它没有修复它,甚至没有改变它的行为,我的想法是,这些AutoCMD已经默认设置为开始

这发生在谁身上了吗?我甚至以root用户的身份运行它,所以我真的不明白为什么某些特定的
options.txt.gz
文件甚至是只读的


现在我不得不承认,如果我真的登录到我自己的用户帐户而不是root,一切似乎都很好。因此,我想这仍然可以作为一个很好的提醒,提醒您不要以root用户的身份做任何事情。

常见问题解答中介绍了这一点


顺便问一下:helpgrep在CentOS上工作吗?如果不是,你可能想考虑在Stand OS打开一个bug报告,请求不要压缩帮助文件。

为什么你首先把这些文件格式化?我没有碰它们。事情就是这样。我刚刚安装了vim,
yum安装vim
嗯,这些文件不应该是gzip文件。找出原因…也许你安装的软件包有问题?你能告诉我们这些文件的位置吗?
“/usr/share/vim/vim74/doc/options.txt.gz”[readonly]425行
,并从我的非root用户处访问:
“/usr/share/vim/vim74/doc/options.txt.gz”[readonly]8297行
。这看起来像是在说它正在为我动态地解压(正确地)
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