"Pablo Giménez" wrote:
> I have in my $HOME/.vimrc the next statetement to set the runtime
> path:
> set runtimepath=$MYPATH, $VIMRUNTIME
It looks like you should be using:
let &rtp=$MYPATH.','.&rtp
rtp default value is not $VIMRUNTIME, see :h 'rtp'
--
Luc Hermitte
http://lh-vim.googlecode.com/
http://hermitte.free.fr/vim/
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
> On Jun 4, 3:23 am, Luc Hermitte <hermi...@free.fr> wrote:
>
> > It looks like you should be using:
> > let &rtp=$MYPATH.','.&rtp
>
> or more plainly
>
> set rtp^=$MYPATH
Indeed, that's much better!
I didn't know :set^=
It is recommended to also have "after" directories (see :help
after-directory) so you can tweak, /a posteriori/, the settings set by
the standard Vim scripts.
The default 'vimruntime' setting, on most systems, includes the
following in order:
$HOME/.vim (on Unix), or
$HOME/vimfiles (on Windows)
for single-user full-fledged scripts
$VIM/vimfiles (on all platforms)
for system-wide scripts not distributed with Vim
$VIMRUNTIME
for scripts distributed with Vim (don't touch them)
$VIM/vimfiles/after
for system-wide tweaks to any of the above
$HOME/.vim/after (on Unix)
$HOME/vimfiles/after (on Windows)
for single-user tweaks to any of the above
This is a "sane" default, and in most cases it is better not to change
it. However if you are still dead set on using another value by means of
the environment, try the following:
:let $MYVIMPATH1 = '/opt/myvimstuff'
:let $MYVIMPATH2 = '/opt/myvimstuff/after'
:set runtimepath=$VIMRUNTIME
:set runtimepath^=$MYVIMPATH1
:set runtimepath+=$MYVIMPATH2
Note that there should be NO SPACES immediately before or after the
commas in this option, or after the equal sign in the :set statement,
and that if you want to include spaces inside the value (as on Windows,
where typical directory names include "Documents and Settings" and
"Program Files") each space must be backslash-escaped in the :set
statement (this applies to any option, and also for backslashes, hard
tabs, vertical bars and double quotes, see ":help option-backlash").
Best regards,
Tony.
--
f y cn rd ths thn y cn hv grt jb n cmptr prgrmmng
Pablo Giménez
This sounds quite complicated.
Why not just
if exists('$TDVIMROOT') && ($TDVIMROOT != "")
\ && isdirectory($TDVIMROOT)
let s:rtp = split(&rtp, ',')
call insert(s:rtp, $TDVIMROOT, 1)
call insert(s:rtp, $TDVIMROOT . '/after', -1)
let &rtp = join(s:rtp, ',')
else
echoerr 'Please define $TDVIMROOT as the TDVim install directory'
endif
but then, why insist that your plugin be housed in a different directory
tree than the rest? Why not just add one or more additional files at the
appropriate location(s) in some existing 'runtimepath' directory tree
(other than $VIMRUNTIME), like everyone else does? Distributing a bunch
of files for installation into a 'runtimepath' tree, each file into its
proper subdir, can even be automated, see ":help pi_vimball.txt".
Best regards,
Tony.
--
Everything you've learned in school as "obvious" becomes less and less
obvious as you begin to study the universe. For example, there are no
solids in the universe. There's not even a suggestion of a solid.
There are no absolute continuums. There are no surfaces. There are no
straight lines.
-- R. Buckminster Fuller
but then, why insist that your plugin be housed in a different directory tree than the rest? Why not just add one or more additional files at the appropriate location(s) in some existing 'runtimepath' directory tree (other than $VIMRUNTIME), like everyone else does? Distributing a bunch of files for installation into a 'runtimepath' tree, each file into its proper subdir, can even be automated, see ":help pi_vimball.txt".
Best regards,
Tony.
--
Everything you've learned in school as "obvious" becomes less and less
obvious as you begin to study the universe. For example, there are no
solids in the universe. There's not even a suggestion of a solid.
There are no absolute continuums. There are no surfaces. There are no
straight lines.
-- R. Buckminster Fuller