Re: sourcing the contents of a register
- "Douglas L . Potts" wrote:
>I tried yanking a function definition. With
> On Thu, Aug 01, 2002 at 08:05:22AM -0400 Cory T. Echols wrote:
> > On 08/01, Douglas L . Potts wrote:
> > > I want to re-source part of my vimrc, without having to write the
> > > section out to file, source that, and then delete it. I would love to
> > > be able to copy the section into a register, and then do some vim magic
> > > to source the contents of the register (all without writing to the file
> > > system).
> > Yank the relevant portions to a register (say "a), and then do
> > :exe @a. (The @a expands to the contents of the register).
> > I just tried this for some simple cases and it seems to work, but I have
> > this feeling there may be caveats that I'm unaware of.
> I haven't run into any exceptions yet either. This fits what I was
> looking for a little better than Jurgen's suggestion. I think this was
> any expansions that are listed are handled correctly.
> I let you know if I find something that breaks this method, though I
> don't expect to.
> Thanks to you both, Cory and Jürgen.
it did not work. I think the :function command is special. Jürgen's
HTH --Benji Fisher