views:

191

answers:

1

Related to vim-how-to-reformat-a-set-of-lines-into-a-single-lines-if-the-line-is-a-single

I'd like gq to treat a '.' as the end of a sentence in latex. Combined with a high value of tw, the intention is automatically reformat a paragraph into a list of lines.

(FYI, this is a much nicer way to edit latex, if you are wondering)

+2  A: 

When I edit Latex, I use

:imap <Space><Space> <CR>

Don't think that it needs reformatting tricks.


Paul Biggar comments out that the similar solution works for people not used to putting two spaces at the end of each sentence:

:imap .<Space> .<CR>
Pavel Shved
Nice idea, but I never learned to put two spaces after the end of a sentence...
Paul Biggar
Based on that, I can just make it `imap .<Space> .<CR>`. Thanks.
Paul Biggar
@Paul Biggar: I merged your idea into my answer. You don't mind, do you?
Pavel Shved
@Pavel Shved: Of course not, I'd hoped you would. I didn't want to steal what's essentially your idea for my own answer :)
Paul Biggar