copy string into register in script

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

copy string into register in script

Zbigniew Kowalski
Dear Vimmers,

How can i copy a string into a specific register in vim script.
I want to have a script which fills registers with predefined values so that i can source it and execute/paste them later on.
I'd expect something like:
register a="string1"
register b="string2"
and so

best regards

Zbigniew Kowalski
http://zbikow1.webpark.pl/


Reply | Threaded
Open this post in threaded view
|

Re: copy string into register in script

ice_2001cn

Zbigniew Kowalski wrote:

> Dear Vimmers,
>
> How can i copy a string into a specific register in vim script.
> I want to have a script which fills registers with predefined values so that i can source it and execute/paste them later on.
> I'd expect something like:
> register a="string1"
> register b="string2"
> and so
>
> best regards
>
> Zbigniew Kowalski
> http://zbikow1.webpark.pl/
>
>
>
>
:h setreg

Reply | Threaded
Open this post in threaded view
|

Re: copy string into register in script

Eric Arnold-3
also

let @a = 'whatever'


On 4/19/06, ice_2001cn <[hidden email]> wrote:

>
> Zbigniew Kowalski wrote:
> > Dear Vimmers,
> >
> > How can i copy a string into a specific register in vim script.
> > I want to have a script which fills registers with predefined values so that i can source it and execute/paste them later on.
> > I'd expect something like:
> > register a="string1"
> > register b="string2"
> > and so
> >
> > best regards
> >
> > Zbigniew Kowalski
> > http://zbikow1.webpark.pl/
> >
> >
> >
> >
> :h setreg
>
>