I am sure Vim has an option for this, so do please point me towards
whichever documentation I need to read. :)
Quite often, I have:
:set tw=74
Which is common for most text files and especially so when composing
email. Vim makes a good job at automatically wrapping my text at 74
characters as I type.
However, let's say that I've typed a paragraph, and Vim's wrapped it
all at 74 characters. Great. But I then have to insert text
somewhere on a line in the middle of the paragraph. As soon as I do
that, the indentation for the whole paragraph is broken. I usually do
this by immediately pressing:
gq}
Which will either then reformat the paragraph correctly, or sometimes
(and I don't know under what conditions this happens) will proceed to
line-wrap more than the paragraph its been asked to.
Likewise, I sometimes find myself editing text, and pressing:
J
To join lines together. I then also will press:
gq}
To reformat the paragraph.
So, hopefully with the above making sense, I am wondering if:
* Whether "gq}" is even the correct mapping to use in Vim to reformat
paragraphs.
* Whether there's an option in Vim to tell it to always automatically
reformat paragraphs as I type them. It's annoying having to press
"gq}" each time. This includes also the case where I press "J" to
join lines.
Does anyone else do anything similar? Perhaps there's a whole set of
tips on paragraph reformatting waiting to happen. Do speak up if so.
:)
TIA,
-- Thomas Adam
--
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
No comments:
Post a Comment