newbie: recording problem

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

newbie: recording problem

Vu The Cuong
Hi all,
I've just read vim help about recording fearture of vim. It quite help me
alot of typing.
But I have 1 problems with it. I already searched in Vim help but found
nothing.

For example, I already recording and register with "a".
But when I closed vim and reopen again, it stopped working.
Could anyone teach me the way to reuse it even when I closed and reopen the
file?
many thanks

Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

Chris Allen
On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> For example, I already recording and register with "a".
> But when I closed vim and reopen again, it stopped working.
> Could anyone teach me the way to reuse it even when I closed and reopen the
> file?

Non-empty registers are, by default, saved, which includes recordings
in the registers.  It may be that you have Vim in Vi-compatible mode,
which defaults to not saving the registers.  You can check this by
typing:

    set compatible?

Which will answer with either compatible or nocompatible.  You want it
to say 'nocompatible'. Either way, you probably want to ensure that
the line:

    set nocompatible

Is the first line in your vimrc file, because it is the most important
setting in Vim.

If it is not a 'compatible' setting problem, then your 'viminfo'
setting needs changing.  Try something like:

    set viminfo+=<50

Which sets the number of lines per register to save in your viminfo
file.  See :help viminfo for details.  You might want to try:

    set viminfo?

to see what the current setting is before you change it.

HTH,
Chris Allen
Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

Vu The Cuong
thank you for the reply
There is a line "set nocompatible" in my vimrc file at the top of file.
I tried to reproduced the prob I described before but in this time it's OK
even after I reopened it.
May be in previous time I did something wrong.
thank you:)

----- Original Message -----
From: "Chris Allen" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>
Cc: <[hidden email]>
Sent: Wednesday, August 17, 2005 2:48 PM
Subject: Re: newbie: recording problem


On 16/08/05, Vu The Cuong <[hidden email]> wrote:
> For example, I already recording and register with "a".
> But when I closed vim and reopen again, it stopped working.
> Could anyone teach me the way to reuse it even when I closed and reopen
the
> file?

Non-empty registers are, by default, saved, which includes recordings
in the registers.  It may be that you have Vim in Vi-compatible mode,
which defaults to not saving the registers.  You can check this by
typing:

    set compatible?

Which will answer with either compatible or nocompatible.  You want it
to say 'nocompatible'. Either way, you probably want to ensure that
the line:

    set nocompatible

Is the first line in your vimrc file, because it is the most important
setting in Vim.

If it is not a 'compatible' setting problem, then your 'viminfo'
setting needs changing.  Try something like:

    set viminfo+=<50

Which sets the number of lines per register to save in your viminfo
file.  See :help viminfo for details.  You might want to try:

    set viminfo?

to see what the current setting is before you change it.

HTH,
Chris Allen

Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

A.J.Mechelynck
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 7:57 AM
Subject: Re: newbie: recording problem


> thank you for the reply
> There is a line "set nocompatible" in my vimrc file at the top of file.
> I tried to reproduced the prob I described before but in this time it's OK
> even after I reopened it.
> May be in previous time I did something wrong.
> thank you:)

You can check what is in your registers at any time, with the command
":registers" (type it without the quotes).

Best regards,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

Vu The Cuong
Thanks. it helped me a lot

----- Original Message -----
From: "Tony Mechelynck" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 6:05 PM
Subject: Re: newbie: recording problem


> ----- Original Message -----
> From: "Vu The Cuong" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, August 17, 2005 7:57 AM
> Subject: Re: newbie: recording problem
>
>
> > thank you for the reply
> > There is a line "set nocompatible" in my vimrc file at the top of file.
> > I tried to reproduced the prob I described before but in this time it's
OK

> > even after I reopened it.
> > May be in previous time I did something wrong.
> > thank you:)
>
> You can check what is in your registers at any time, with the command
> ":registers" (type it without the quotes).
>
> Best regards,
> Tony.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

Vu The Cuong
In reply to this post by A.J.Mechelynck
Another question about recording and abbreviate:

I use 2 computers:
One is in my company and onother one in my home.
assumed that I already registered something with recording and abbreviate in
the PC of my company.
How can I "copy" that info, put them in my home's Pc and use them without
register all again?
many thanks.
----- Original Message -----
From: "Tony Mechelynck" <[hidden email]>
To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
Sent: Wednesday, August 17, 2005 6:05 PM
Subject: Re: newbie: recording problem


> ----- Original Message -----
> From: "Vu The Cuong" <[hidden email]>
> To: <[hidden email]>
> Sent: Wednesday, August 17, 2005 7:57 AM
> Subject: Re: newbie: recording problem
>
>
> > thank you for the reply
> > There is a line "set nocompatible" in my vimrc file at the top of file.
> > I tried to reproduced the prob I described before but in this time it's
OK

> > even after I reopened it.
> > May be in previous time I did something wrong.
> > thank you:)
>
> You can check what is in your registers at any time, with the command
> ":registers" (type it without the quotes).
>
> Best regards,
> Tony.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

A.J.Mechelynck
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 17, 2005 12:02 PM
Subject: Re: newbie: recording problem


> Another question about recording and abbreviate:
>
> I use 2 computers:
> One is in my company and onother one in my home.
> assumed that I already registered something with recording and abbreviate
> in
> the PC of my company.
> How can I "copy" that info, put them in my home's Pc and use them without
> register all again?
> many thanks.

For mappings, abbreviations and option settings, copy the vimrc of one
computer to the other and copy-paste the relevant lines to the latter's
vimrc. How to transfer the file will depend on each computer's equipment
(copy to diskette, burn a CD, upload/download to a web hosting site, ...).
If your business computer has (maybe for security reasons) no diskette
drive, no CD drive _and_ no Internet connection (but maybe only a LAN
connection with no access to the outside) you may have to make a paper copy
(see ":help :hardcopy" if you have a printer) and retype it on the other
computer.

For macros, they are in the viminfo but that's tricky. Another possibility
would be to redirect (see ":help :redir") the output of the :reg command to
a file and (on the other computer) yank the relevant part(s) to the desired
register(s). (e.g., highlight the text in Visual mode using v followed by
cursor moves, then yank the highlighted area to register r by means of
"ry ).


HTH,
Tony.


Reply | Threaded
Open this post in threaded view
|

Re: newbie: recording problem

Vu The Cuong
In reply to this post by Vu The Cuong
>Just copy the .viminfo or _viminfo file from your office pc to home pc
Where is it? I'm using windows, vim 6.3
thanks
----- Original Message -----
From: "Vu The Cuong" <[hidden email]>
To: "Goli, Rajesh (Rajesh)" <[hidden email]>
Sent: Thursday, August 18, 2005 7:57 AM
Subject: Re: newbie: recording problem


> thank you. I'll try it tonight at home.:)
> ----- Original Message -----
> From: "Goli, Rajesh (Rajesh)" <[hidden email]>
> To: "Vu The Cuong" <[hidden email]>
> Sent: Wednesday, August 17, 2005 7:17 PM
> Subject: RE: newbie: recording problem
>
>
> > Just copy the .viminfo or _viminfo file from your office pc to home pc
or
> > vice versa.
> > If you put the abbreivations in .vimrc you may want to copy that file
too.

> >
> > -Rajesh
> >
> > -----Original Message-----
> > From: Vu The Cuong [mailto:[hidden email]]
> > Sent: Wednesday, August 17, 2005 3:32 PM
> > To: [hidden email]
> > Subject: Re: newbie: recording problem
> >
> >
> > Another question about recording and abbreviate:
> >
> > I use 2 computers:
> > One is in my company and onother one in my home.
> > assumed that I already registered something with recording and
abbreviate
> in
> > the PC of my company.
> > How can I "copy" that info, put them in my home's Pc and use them
without

> > register all again?
> > many thanks.
> > ----- Original Message -----
> > From: "Tony Mechelynck" <[hidden email]>
> > To: "Vu The Cuong" <[hidden email]>; <[hidden email]>
> > Sent: Wednesday, August 17, 2005 6:05 PM
> > Subject: Re: newbie: recording problem
> >
> >
> > > ----- Original Message -----
> > > From: "Vu The Cuong" <[hidden email]>
> > > To: <[hidden email]>
> > > Sent: Wednesday, August 17, 2005 7:57 AM
> > > Subject: Re: newbie: recording problem
> > >
> > >
> > > > thank you for the reply
> > > > There is a line "set nocompatible" in my vimrc file at the top of
> file.
> > > > I tried to reproduced the prob I described before but in this time
> it's
> > OK
> > > > even after I reopened it.
> > > > May be in previous time I did something wrong.
> > > > thank you:)
> > >
> > > You can check what is in your registers at any time, with the command
> > > ":registers" (type it without the quotes).
> > >
> > > Best regards,
> > > Tony.
> > >
> > >
>