gvim - opposite of J - ie how to break a line...

gvim - opposite of J - ie how to break a line...

Post by ln » Sat, 13 Jan 2001 10:28:21



Hi all,
rather basic question - i have searched help on "break" and looked for "J" -
but could not get any info on how to break a line from command mode...

l.

 
 
 

gvim - opposite of J - ie how to break a line...

Post by Craig Peterei » Sat, 13 Jan 2001 10:59:33



> Hi all,
> rather basic question - i have searched help on "break" and looked for "J" -
> but could not get any info on how to break a line from command mode...

Insert a carriage return, either manually, or with a mapping such as:

:map ;b <esc>i<cr><esc>

HTH,

--
Craig Peterein


 
 
 

gvim - opposite of J - ie how to break a line...

Post by Stan Bro » Sat, 13 Jan 2001 19:41:23



Quote:>rather basic question - i have searched help on "break" and looked for "J" -
>but could not get any info on how to break a line from command mode...

Suppose your line is
        this line needs a break just before the first j

If by "command mode" you mean with a : command, it's
        :s/j/
then type Control-V and Control-M and continue with
        j/
and the Enter key.

But it's much easier in insert mode. Position where you want a line
break, hit i to enter insert mode, and press the Enter key. Then
either keep typing to insert text, or press the Esc key.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
                                  http://oakroadsystems.com/
"And if you're afraid of butter, which many people are nowa-
days, (long pause) you just put in cream."     --Julia Child

 
 
 

gvim - opposite of J - ie how to break a line...

Post by Sven Guck » Mon, 15 Jan 2001 05:48:30



Quote:> rather basic question - i have searched help on
> "break" and looked for "J" - but could not get
> any info on how to break a line from command mode...

I usually replace a space with a CR, ie "r<CR>".
And if there's no space, well, then I simply
go into insert mode first.  But of course
you can map this to some combination.

Sven

 
 
 

gvim - opposite of J - ie how to break a line...

Post by Alan Mackenzi » Mon, 15 Jan 2001 04:31:46



Quote:> Hi all,
> rather basic question - i have searched help on "break" and looked for
> "J" - but could not get any info on how to break a line from command
> mode...

Most of the time you'll probably be wanting to break on a space, and
you'll not be too worried about what happens to that space. Move the
cursor onto the space and replace it with a carriage return, using the
key sequence:

r <CR>

Quote:> l.

--
Alan Mackenzie (Munich, Germany)

(like "aa"), remove one of them (leaving, say, "a").
 
 
 

1. replace text (or multiple line breaks) with single line break in Windows VIm

I have checked the previous posts on this but I really cannot find a
way to do this.  I have a file with multiple consecutive line breaks,
and I want to put a command in my script that replaces all of these
with single line breaks, with a :%s/old/new/g type command.  But
*whatever* I do, it seems to insert literals and not line breaks.  I
am using VIm 6.1 for Win NT.
Please help!

2. booting from the vmunix.prev

3. BUG: PDF via Back Button Breaks Frame Target in IE

4. ico files displayed always with same icon ?!?

5. PDF document broken in IE plugin

6. Explorer.exe Fault

7. GVIM Windows GUI: Filename completion is (intentionally?) broken

8. Looking for slip shareware?

9. colors in linux gvim broken?

10. Blank lines appear in PDF using IE, Reader 4.x

11. gvim command line colour

12. Setting 'lines/columns' variables without moving gvim's frame

13. gVim- Coloured line numbering?