On Tue, Nov 4, 2008 at 10:35 AM, 703designs <[EMAIL PROTECTED]> wrote:
>
> How would I work a variable into a "source" line? For example, this
> doesn't work (failed var interpolation...I'm fairly new to this):
>
> let myConfig = split(&runtimepath, ',')[0]
> source {myConfig}/scripts/conf/basic.vim
You want to bridge the gap between ex commands (the :source command) and the
Vim expression language (the split() function). That's a job for the
:execute command:
:execute "source " . myConfig . "/scripts/conf/basic.vim"
Read all about it:
:help :execute
>
>
> Thanks,
> Thomas
>
> On Nov 4, 11:41 am, "Erik Falor" <[EMAIL PROTECTED]> wrote:
> > On Tue, Nov 4, 2008 at 9:34 AM, 703designs <[EMAIL PROTECTED]>
> wrote:
> >
> > > What's the shortcut (like $HOME, $VIMHOME, etc.) for the user's .vim
> > > or vimfiles directory? I use the same settings on a Mac and on
> > > Windows, and this is the main obstacle to making my sources work
> > > seamlessly cross-platform.
> >
> > split(&runtimepath, ',')[0]
> >
> >
> >
> > --
> > Erik Falor
> > Registered Linux User #445632http://counter.li.org
> >
>
--
Erik Falor
Registered Linux User #445632 http://counter.li.org
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---