vim next line

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

vim next line

Neszt Tibor
Hello!

Can anyone help me, how to force vim to go to the next line in case going the
to the right at the end of the line?


Regards,
   Neszt Tibor

E-mail: [hidden email]
PGP: 0x71EC8049
   Fingerprint = 3005 B925 C116 CCCE 117C  C6A4 20CC 8B22 71EC 8049
Reply | Threaded
Open this post in threaded view
|

Re: vim next line

Neszt Tibor
Thank You for Your reply.

I try to tell different way, what I need. (sorry for my bad english)

Suppose, I have the following text file (two lines):

ab
cd

Starting vim, I would like to go to "d" pressing the l (step right) key 3
times. (3l) The cursor stops at b(the screen is blinking). Is there any
option or other possibility to go to c from b using key l (or other right
key)?

It would be also good either in the insert mode.

Best regards,
  Neszt Tibor

E-mail: [hidden email]
PGP: 0x71EC8049
   Fingerprint = 3005 B925 C116 CCCE 117C  C6A4 20CC 8B22 71EC 8049

On Sat, 2 Jul 2005, Tony Mechelynck wrote:

> ----- Original Message ----- From: "Neszt Tibor" <[hidden email]>
> To: <[hidden email]>
> Sent: Saturday, July 02, 2005 2:03 PM
> Subject: vim next line
>
>
>> Hello!
>>
>> Can anyone help me, how to force vim to go to the next line in case going
>> the to the right at the end of the line?
>>
>>
>> Regards,
>>   Neszt Tibor
>
> see
>   :help 'textwidth'
>   :help 'wrapmargin'
>
>
> Best regards,
> Tony.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: vim next line

Suresh Govindachar`
 Neszt Tibor Sent on July 02, 2005 2:03 PM

> Hello!
>
> Can anyone help me, how to force vim to go to the next line in
> case going the to the right at the end of the line?
>

:help l brings up the section on "Left-right motions".  Quoting from
the bottom of this section:  

  | These commands move the cursor to the specified column in the
  | current line.  They stop at the first column and at the end of
  | the line, except "$", which may move to one of the next lines.
  | See 'whichwrap' option to make some of the commands move across
  | line boundaries.

This leads to :help whichwrap (or just putting the cursor on the
word 'whichwrap' and hitting return).  From there, what needs to be
done is

    :set whichwrap+=l.  

However, note the caveat:

  | When 'l' is included, you get a side effect: "yl" on an empty
  | line will include the <EOL>, so that "p" will insert a new line.

--Suresh