I found a strange issue with vim that I can't seem to easily fix:
[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 (-):
Just doing some messing around as root user on a VM here... I installed vim
with yum
, it works great with my config files... the only thing is I can't read most of the Vim documentation.
I even tried adding this to .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
It did not fix it or even change the behavior, my thinking is that these autocmds are already set by default to begin with.
Has this happened to anyone? I'm even running this as root user so i don't really understand why some particular options.txt.gz
file would even be read-only.
Now I do have to admit that everything seems to work fine if I actually log in to my own user account instead of root. So I guess this can still serve as a pretty good reminder to not do everything as root user...