[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-talk] vim text wrapping



Excerpts from Ico Doornekamp's message of Thu Mar 17 12:19:29 -0400 2011:
> * On Thu Mar 17 15:26:51 +0100 2011, Philippe LeCavalier wrote:
>  
> > This is more of a vim question than it is a sup one but I'm not a
> > member of the vim list so I thought I'd ask you guys first.
> > 
> > Since I don't write very well I always end up making changes while
> > re-reading myself. When I edit a line Vim doesn't wrap anymore like it
> > did when I first typed the text. So all the lines I've edited aren't
> > wrapped like the others. It can make reading my mail challenging at
> > times.
> > 
> > Perhaps I'm misunderstanding how to properly edit text in vim?
> 
> I guess this can be called a 'feature' of vim, Bram probably has a good
> reason for making it behave as it does. 
> 
> As far as I know, wrapping only occurs when you are in insert mode
> adding text at the end of the current line, but not when you are
> inserting text in the middle of a line.
> 
> My own habit is to just add or remove the text as a go, and hit the key
> sequence 'gwap' to clean up the mess, which means so much as 'reformat
> (rewrap) the current paragraph'. The vim help for 'gw':
> 
>   gw{motion}    Format the lines that {motion} moves over.  Similar to
>                 |gq| but puts the cursor back at the same position in
>                 the text.  However, 'formatprg' and 'formatexpr' are
>                 not used.  {not in Vi}
> 
> where {motion} would be 'ap', meaning 'a paragraph'.
> 
> It looks kind of cumbersome in the beginning, but I'm very much used to
> it and don't even think about it anymore.
> 
> 
> 
> -- 
> :wq
> ^X^Cy^K^X^C^C^C^C
> _______________________________________________
> sup-talk mailing list
> sup-talk@rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-talk
> 
That's pretty much what I expected since I had already visited the
options for textwidth and the like. I can certainly get used to a kbd
sequence since I expect that sort of thing when using Vim. In fact,
since adopting sup my hands don't really leave the keyboard.

However what James mentioned about formatoptions might alleviate that.
James, I add these types of things to my vim line in config.yaml rather
than my rc file. I to don't always want wrapping at 72 and the like. But
I do always want this in sup.
-- 
Thanks,
Phil
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk