Wrapping text
I'm not sure this is quite a Mutt question, but someone on here probably has a good answer. I have a hook for creating custom signature. In it, I call a program which sometimes generates really long lines which I have to wrap myself. Is there any way to have vim wrap them? I have textwidth set to 76, so that as I type, it wraps. But it does not wrap lines that are already there, if you know what I mean. If that's not possible, does anyone know of quick and dirty way to, say, do it in bash? It's already a bash script now. -- Sean LeBlanc, [EMAIL PROTECTED] IM- Yahoo: seanleblancathome ICQ: 138565743 MSN: seanleblancathome AIM: sleblancathome Under capitalism man exploits man; under socialism the reverse is true. -Polish proverb Management QOTD:It's all topsoil in a drought year if we don't accelerate and maintain our commitment to the management wrapper, etc.
Re: Wrapping text
On Wed, Nov 21, 2001 at 02:58:50PM -0700, Sean LeBlanc [EMAIL PROTECTED] wrote: I'm not sure this is quite a Mutt question, but someone on here probably has a good answer. I have a hook for creating custom signature. In it, I call a program which sometimes generates really long lines which I have to wrap myself. Is there any way to have vim wrap them? I have textwidth set to 76, so that as I type, it wraps. But it does not wrap lines that are already there, if you know what I mean. If that's not possible, does anyone know of quick and dirty way to, say, do it in bash? It's already a bash script now. You could use fmt or a similar tool. I would try: long_line_producer|fmt or something similar. Nicolas
Re: Wrapping text
On Wed, Nov 21, 2001 at 02:58:50PM -0700, Sean LeBlanc wrote: I'm not sure this is quite a Mutt question, but someone on here probably has a good answer. I have a hook for creating custom signature. In it, I call a program which sometimes generates really long lines which I have to wrap myself. Is there any way to have vim wrap them? I have textwidth set to 76, so that as I type, it wraps. But it does not wrap lines that are already there, if you know what I mean. To do this within vim, just put the cursor on the too-long line and type gqq See :help gq Depending on how fancy you wanted to get, you could probably set up an autocommand to do this automatically when you opened the file, something like au BufNewFile,BufRead /tmp/mutt-* $normal gqq for example, if the line to be reformatted is the last line of your signature. Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Spokane, Washington, USA http://www.spocom.com/users/gjohnson/mutt/ |
Re: Wrapping text
On 11-21 14:44, Gary Johnson wrote: On Wed, Nov 21, 2001 at 02:58:50PM -0700, Sean LeBlanc wrote: I'm not sure this is quite a Mutt question, but someone on here probably has a good answer. I have a hook for creating custom signature. In it, I call a program which sometimes generates really long lines which I have to wrap myself. Is there any way to have vim wrap them? I have textwidth set to 76, so that as I type, it wraps. But it does not wrap lines that are already there, if you know what I mean. To do this within vim, just put the cursor on the too-long line and type gqq See :help gq Depending on how fancy you wanted to get, you could probably set up an autocommand to do this automatically when you opened the file, something like au BufNewFile,BufRead /tmp/mutt-* $normal gqq for example, if the line to be reformatted is the last line of your signature. Gary Thanks. Nicolas suggested using fmt, and that works just fine for the sig. However, your suggestion is good to know. I've been manually fixing lines that got over my limit (and then adjusting via joins and newlines until the next paragraph, etc), and I wish I had known about gqq (and variants) in the past. As Burns would say: Ecellent. :) -- Sean LeBlanc:[EMAIL PROTECTED] Yahoo:seanleblancathome ICQ:138565743 MSN:seanleblancathome AIM:sleblancathome As far as we know, our computer has never had an undetected error. -Weisert Management QOTD:Look, it is time we caucus. I feel we must turn the crank and maintain our commitment to the cost control, etc.
Re: Wrapping Text
Thanks, I tried that and it only controls the display. Printing is unaffected. On Wed, Oct 24, 2001 at 10:43:44PM -0400, John P. Verel wrote: You may want to have a look at smart_wrap, item 6.3.182 in the manual (F1). John On 10/24/01, 05:51:13PM -0700, Michael Montagne wrote: When viewing a mail message, how do I reset the width of my margins so it will print properly. I use vim to write mail and that is ok but the mutt viewer for mail i receive does not control the width. I know I'm missing something. thanks -mjm -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com -- John P. Verel Norwalk, Connecticut -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com
Re: Wrapping Text
Michael Montagne wrote: Thanks, I tried that and it only controls the display. Printing is unaffected. ahh didn't notice that part of your message. you should probably use a formatting program to print your mail. there are some discussions of this in the archives; i use: set print_cmd=enscript -Email set print_split=yes (which requires that enscript be installed). other people prefer different or more elaborate printing programs; that seems to work for my needs so i haven't messed with it much. w -- GPG Public Key: http://infinitejazz.net/will/pgp/
Re: Wrapping Text
Yes!! Very good. But what does print_split do? It's not in my manual. On Thu, Oct 25, 2001 at 10:01:29AM -0700, Will Yardley wrote: Michael Montagne wrote: Thanks, I tried that and it only controls the display. Printing is unaffected. ahh didn't notice that part of your message. you should probably use a formatting program to print your mail. there are some discussions of this in the archives; i use: set print_cmd=enscript -Email set print_split=yes (which requires that enscript be installed). other people prefer different or more elaborate printing programs; that seems to work for my needs so i haven't messed with it much. w -- GPG Public Key: http://infinitejazz.net/will/pgp/ -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com
Re: Wrapping Text
Michael Montagne wrote: Yes!! Very good. But what does print_split do? It's not in my manual. hrmm not in my man page (maybe the old man page is earlier in the path), and i don't know if it's in 1.2.5, but... (from /etc/Muttrc) set print_split=no Name: print_split Type: boolean Default: no Used in connection with the print-message command. If this option is set, the command sepcified by $print_command is executed once for each message which is to be printed. If this option is unset, the command specified by $print_command is executed only once, and all the messages are concatenated, with a form feed as the message separator. Those who use the enscript(1) program's mail-printing mode will most likely want to set this option. w -- GPG Public Key: http://infinitejazz.net/will/pgp/
Re: Wrapping Text
Sorry, I missed the printing part as well. Here's my printing configuration: set print_command=enscript --word-wrap --margins=::: -f 'Times-Roman11'-F 'TimesRoman14' --fancy-header='enscript' -i3 This solves all the word wrap problems and makes all printouts real purdy ;) John On 10/25/01, 08:45:37AM -0700, Michael Montagne wrote: Thanks, I tried that and it only controls the display. Printing is unaffected. On Wed, Oct 24, 2001 at 10:43:44PM -0400, John P. Verel wrote: You may want to have a look at smart_wrap, item 6.3.182 in the manual (F1). John On 10/24/01, 05:51:13PM -0700, Michael Montagne wrote: When viewing a mail message, how do I reset the width of my margins so it will print properly. I use vim to write mail and that is ok but the mutt viewer for mail i receive does not control the width. I know I'm missing something. thanks -mjm -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com -- John P. Verel Norwalk, Connecticut -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com -- John P. Verel Norwalk, Connecticut
Wrapping Text
When viewing a mail message, how do I reset the width of my margins so it will print properly. I use vim to write mail and that is ok but the mutt viewer for mail i receive does not control the width. I know I'm missing something. thanks -mjm -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com
Re: Wrapping Text
You may want to have a look at smart_wrap, item 6.3.182 in the manual (F1). John On 10/24/01, 05:51:13PM -0700, Michael Montagne wrote: When viewing a mail message, how do I reset the width of my margins so it will print properly. I use vim to write mail and that is ok but the mutt viewer for mail i receive does not control the width. I know I'm missing something. thanks -mjm -- Michael Montagne [EMAIL PROTECTED] http://www.boora.com -- John P. Verel Norwalk, Connecticut