Bug 199465 - vim ignores ${VIM} variable. Does not show up in runtimepath (rtp) attribute.
vim ignores ${VIM} variable. Does not show up in runtimepath (rtp) attribute.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: vim (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
David Lawrence
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-19 14:31 EDT by Hans Deragon
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-07-27 09:28:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans Deragon 2006-07-19 14:31:41 EDT
vim ignores ${VIM} variable.  According to ":help rtp", if set, ${VIM} should
show up when typing ":set rtp".  It works under SLES 9 and SLED 10, but neither
in FC4, FC5 or RHEL 3.

I asked on channel #vim on IRC and another user confirmed that it fails on FC5.
Comment 1 Hans Deragon 2006-07-19 15:01:45 EDT
Could this problem be related to:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2188

(Credits goes to Zathrus on #vim channel for finding this)
Comment 2 Karsten Hopp 2006-07-20 06:17:51 EDT
fixed in vim-7.0.039-1
Comment 3 Hans Deragon 2006-07-26 21:14:32 EDT
Thanks for the quick response time, but unfortunatly, the version I
downloaded at:
 
http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/vim-7.0.042-1.src.rpm

does not work as expect.  When ${VIM} is set, the system path is gone.
${VIM} is not meant to replace the system path, but to be added to the
runtimepath, along with the system path.

Here is the receipe to reproduce the problem.



${VIM} NOT SET  ======================================================

At the shell:

  # unset VIM
 Within vim: 
  :set rtp
 
runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,~/.vim/after



${VIM} SET  ==========================================================

At the shell:

  # export VIM=/home/someuser/vim

Within vim:

  :set rtp  
runtimepath=~/.vim,/home/someuser/vim/vimfiles,/home/someuser/vim,/home/someuser/vim/vimfiles/after,~/.vim/after

Notice that the /usr/share/vim* directories are not there anymore.  That
means that non of the help file, syntax files, default plugins and more
are available to vim.


HOW IT SHOULD WORK  ==================================================

What we expect is:

At the shell:

  # export VIM=/home/someuser/vim

Within vim:

  :set rtp  
runtimepath=~/.vim,/home/someuser/vim/vimfiles,/home/someuser/vim,/home/someuser/vim/vimfiles/after,/usr/share/vim/vimfiles,/usr/share/vim/vim70,/usr/share/vim/vimfiles/after,~/.vim/after
Comment 4 Karsten Hopp 2006-07-27 09:28:08 EDT
Here's the output of vim-7 with just the upstream patches applied, build without
using rpm to avoid any interferences:


unset VIM
:set rtp?
  runtimepath=~/.vim,/usr/local/share/vim/vimfiles,/usr/local/share/vim,/usr/loc
al/share/vim/vimfiles/after,~/.vim/after

export VIM=/somedirectory

:set rtp?
  runtimepath=~/.vim,/somedirectory/vimfiles,/somedirectory,/somedirectory/vimfi
les/after,~/.vim/after


So this either obviously isn't a bug introduced by Fedora patches or rtp isn't
what you think it should be.
:h rtp
'runtimepath' 'rtp'     string  (default:
                                        Unix: "$HOME/.vim,
                                                $VIM/vimfiles,
                                                $VIMRUNTIME,
                                                $VIM/vimfiles/after,
                                                $HOME/.vim/after"

This looks to me like you need to set VIMRUNTIME to /usr/share/vim/vim70 if you 
set VIM

export  VIMRUNTIME=/usr/share/vim/vim70
:set rtp?
runtimepath=~/.vim,/somedirectory/vimfiles,/usr/share/vim/vim70,/somedirectory
/vimfiles/after,~/.vim/after

Note You need to log in before you can comment on or make changes to this bug.