El 5 de junio de 2010 00:39, Tony Mechelynck <antoine.mechelynck@...>
This sounds quite complicated.
On 04/06/10 18:53, Pablo Giménez wrote:
I am using this code to make a proper runtimepath:
let s:paths = split(&rtp, ',')
let s:userPaths = 
let s:sysPaths = 
if has("win32") || has("win64")
let s:user = $USERNAME
let s:user =$USER
for path in s:paths
if path =~ s:user
let s:userPaths += [path]
let s:sysPaths += [path]
" Add initial paths for runtimepath:
let&rtp = s:userPaths . ',' . $TDVIMROOT
" Add system paths
for path in s:sysPaths
let&rtp =&rtp . ',' . path
" Add after paths
let&rtp =&rtp . ',' . $TDVIMROOT . '/after' . '.' . s:userPaths
"let&runtimepath=$TDVIMROOT. ',' .&rtp . ',' . $TDVIMROOT . '/after'
echo "TDVIMROOT nor defined.\nPlese set en environment veriable called
TDVIMRROT to the TDVim install location"
So user paths will be before, then my path, and the nsystem paths.
for the after just the other way around , first system, then my stuff and
finally user after location
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, ',')
echoerr 'Please define $TDVIMROOT as the TDVim install directory'
Thanks for the tip, ill try it.
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".
Well the think is that my plugin is basically a lot of other plugins and scripts integrated to make a de velopment environment.
I understand vim's point of view and I think is good for one user who is installing plugins separately.
But in my situation is a pluging that affects many aspepect of vim and I prefer to have everything in one location that eveybody can reuse, not to force every user to install it.
So I followed what many other apps do, being able to replicate the hierarchy of the conf folder and then using an evironment variable enable to use it or not.
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
-- R. Buckminster Fuller
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