Bug 199465 - vim ignores ${VIM} variable. Does not show up in runtimepath (rtp) attribute.
Summary: vim ignores ${VIM} variable. Does not show up in runtimepath (rtp) attribute.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: 5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-19 18:31 UTC by Hans Deragon
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-07-27 13:28:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans Deragon 2006-07-19 18:31:41 UTC
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 19:01:45 UTC
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 10:17:51 UTC
fixed in vim-7.0.039-1

Comment 3 Hans Deragon 2006-07-27 01:14:32 UTC
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 13:28:08 UTC
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.