[prog] replacement strings

Miriam English mim at miriam-english.org
Wed May 26 13:42:27 UTC 2010

Hi Monique,

Thanks for the vim macro to remap Ctrl-J. I tried it in vim, but all it 
did on mine was extend the current selection an extra line. I'll spend 
some more time learning how to get vim to do what I want. This gives me 
somewhere to start. I was frankly surprised at how readable the line was.

	- Miriam

Monique Y. Mudama wrote:
> On Mon, May 24 at 19:05, Miriam English penned:
>> I've been spending hours trying to find something that does the same
>> thing as TextPad's join command. (I really want to get rid of my
>> need for wine.)
>> It joins highlighted text into single lines, keeping paragraphs
>> distinct. The closest I've been able to find is the fmt command
>> (part of the Gnu coreutils, and should be in most linuxes).
>> Unfortunately that has an upper limit of 2,500 characters in a
>> paragraph, which is unrealistic when trying to reformat some texts,
>> especially old ones where most of a page might be a single
>> paragraph.
> I have the following defined for vim when I'm in an e-mail context:
> map <C-J> :let old_tw = &tw<CR>:set tw=72<CR>gqap:let &tw=old_tw<CR>
> It should do what you want when you type control + j.  You can change
> 72 to be whatever line length you prefer.  Or if you'd rather use
> whatever line length is currently defined, you can just do the gqap
> part.
> I found some details here:
> http://openwall.info/wiki/internal/vimrc

If you don't have any failures then you're not trying hard enough.
  - Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
Website: http://miriam-english.org
Blog: http://miriam_e.livejournal.com

More information about the Programming mailing list