On 2010-10-14, rameo wrote:
> I have a really simple question but can't find the solution even after
> reading a lot of websites.
> 
> If I'm in normal mode and want to put a part of the line to the line
> below how can I do this?
> 
> p.e. (in Normal mode):
> 
> this is my text this is my text this is my text this is my text this
> is my text
> 
> -->
> 
> this is my text this is my text this is my text this is my text
> this is my text
> 
> 
> Now I switch to insert mode and after putting the text a line below I
> switch back to normal mode.

Move your cursor to the space preceding the "this" at the end of the
first line.  Type

    r

then hit Enter.  That will move "this" to a new line below the first
line.  The cursor will be at the start of that new line.  Now type

    J

That will join the new line and the line below it to form one line.


An alternative approach would be to set your 'textwidth' to your
longest desired line length, then with the cursor on the first line,
type

    gqj

to reformat the two lines together, obeying the 'textwidth' setting,
or type

    gqip

to reformat the entire paragraph.  See

    :help gq
    :help gw
    :help ip

HTH,
Gary

-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to