Defaulting to inbox on startup

2001-09-19 Thread collin

Is there any way to have mutt default to either the inbox on startup, or
default to a folder that has new mail in it?

Another question I have is about using vim for writing e-mails.  I have
successfully been able to setup vim to wrap at 80 or so characters.
However, if I edit the message, the word wrapping is not preserved.  For
example, if I were to edit my first question above and add two or three
words to it, the line would extend past 80 chars and not wrap unless I
manually edit it.  Is there a solution for this?

Collin Peters



Re: Defaulting to inbox on startup

2001-09-19 Thread Suresh Ramasubramanian

[EMAIL PROTECTED] mutt [18/09/01 23:33 -0700]:
 Is there any way to have mutt default to either the inbox on startup, or
 default to a folder that has new mail in it?

Mutt by default goes to /var/mail/$user (or /var/spool/mail/$user).  
Try mutt -y though - it brings you directly to the folder list.

 Another question I have is about using vim for writing e-mails.  I have
 successfully been able to setup vim to wrap at 80 or so characters.
 However, if I edit the message, the word wrapping is not preserved.  For

set editor=vim +':set tw=77' +':set wrap' +\`awk '/^$/ {print i+2; exit} {i++}' %s\` 
%s 

single line - unwrap if necessary.

-suresh



Re: Defaulting to inbox on startup

2001-09-19 Thread Will Yardley

[EMAIL PROTECTED] wrote:
 Is there any way to have mutt default to either the inbox on startup,
 or default to a folder that has new mail in it?

you can default to a specific mailbox with:
mutt -f mailbox

you can have mutt open the first mailbox in 'mailboxes' that has new
mail with:
mutt -Z

so you could alias mutt to mutt -Z in your shell configuration file.

these two command line options are listed right at the top of the
proverbial 'FM'
 
 Another question I have is about using vim for writing e-mails.  I
 have successfully been able to setup vim to wrap at 80 or so
 characters.  However, if I edit the message, the word wrapping is not
 preserved.  For example, if I were to edit my first question above and
 add two or three words to it, the line would extend past 80 chars and
 not wrap unless I manually edit it.  Is there a solution for this?

the easiest way i know of is typing:
gqip
which will reformat the current paragraph.

gqap reformats all paragraphs i think.  quoting and stuff will be
preserved as long as '' is set in 'comments' in your .vimrc or in the
systemwide vimrc (this is the default)

i miss the normal way of doing things sometimes, but usually gqip is
more flexible and useful. it's very useful for reformatting other
peoples' paragraphs correctly and at the same width as your own text.

w

-- 
Sintax error in config file! (line 378)
aborted!

GPG Public Key:
http://infinitejazz.net/will/pgp/



Re: Defaulting to inbox on startup

2001-09-19 Thread iain truskett

* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [19 Sep 2001 06:58]:
 Is there any way to have mutt default to either the inbox on startup, or
 default to a folder that has new mail in it?

At your command prompt, type: mutt -Z || mutt

In zsh, and presumably bash, you can set an alias. e.g.

alias mutt=mutt -Z || mutt

Put that in your .profile or .bashrc, and then, when you type 'mutt', it
will see if there's new mail anywhere. If so, it'll open to that folder,
else it will open to the inbox.


cheers,
-- 
iain.  http://eh.org/~koschei/

 PGP signature


Re: Defaulting to inbox on startup

2001-09-19 Thread Roberto Suarez Soto

On Sep/18/2001, [EMAIL PROTECTED] wrote:

 Another question I have is about using vim for writing e-mails.  I have

This is not a question really related to vim, or to Colin's message,
but ... well, just out of curiosity: how many people started using vim as
editor just by influence of this list? :-) I know I did, because everyone here
seemed to use it with great success, and maybe others did too :-)

 However, if I edit the message, the word wrapping is not preserved.  For
 example, if I were to edit my first question above and add two or three
 words to it, the line would extend past 80 chars and not wrap unless I
 manually edit it.  Is there a solution for this?

I don't know O:-) What I usually do in that cases is to use Control+J,
which I have mapped to:

imap C-J  C-Ogqap

That usually fixes everything, and has become a second-nature for me.

-- 
   Roberto Suarez Soto·  Ain't no sunshine
 [EMAIL PROTECTED]  ·   When she's gone
Corgo/Lugo/Galicia/Spain  ·



Re: Defaulting to inbox on startup

2001-09-19 Thread Denis Perelyubskiy

 * [EMAIL PROTECTED] [EMAIL PROTECTED] [09-Tue-01 23:41 -0700]:
 [  snip  ]
 Another question I have is about using vim for writing
 e-mails.  I have successfully been able to setup vim to
 wrap at 80 or so characters.  However, if I edit the
 message, the word wrapping is not preserved.  For example,
 if I were to edit my first question above and add two or
 three words to it, the line would extend past 80 chars and
 not wrap unless I manually edit it.  Is there a solution
 for this?

what exactly do you mean by not preserved ? do you mean
that if you add some words to the long line it will not
automatically wrap? do you mean you can't automatically
reformat ?

if you are looking for a way to reformat, then its what
others have suggested before.

you may want to make sure that your 'paste' option is not
set, or else smartindent is turned off and it wont wrap very
well. in fact, in that case the 'tw' is set to 0, and unless
you dont have wrapmargin set it is trouble.

also, you may want to take a look at 'formatoptions' to make
sure you've got it set the way you like it.

in any case, i guess i am not too sure what's the problem i
am trying to suggest a solution for, so i will stop now :)

hth,

denis

-- 
// mailto: Denis Perelyubskiy [EMAIL PROTECTED]
// icq   : 12359698
// PGP   : http://www.cs.ucla.edu/~denisp/files/pgp.asc



Re: Defaulting to inbox on startup

2001-09-19 Thread Roberto Suarez Soto

On Sep/18/2001, [EMAIL PROTECTED] wrote:

 Another question I have is about using vim for writing e-mails.  I have

This is not a question really related to vim, or to Colin's message,
but ... well, just out of curiosity: how many people started using vim as
editor just by influence of this list? :-) I know I did, because everyone here
seemed to use it with great success, and maybe others did too :-)

 However, if I edit the message, the word wrapping is not preserved.  For
 example, if I were to edit my first question above and add two or three
 words to it, the line would extend past 80 chars and not wrap unless I
 manually edit it.  Is there a solution for this?

I don't know O:-) What I usually do in that cases is to use Control+J,
which I have mapped to:

imap C-J  C-Ogqap

That usually fixes everything, and has become a second-nature for me.

-- 
   Roberto Suarez Soto·  Ain't no sunshine
 [EMAIL PROTECTED]  ·   When she's gone
Corgo/Lugo/Galicia/Spain  ·



Re: Defaulting to inbox on startup

2001-09-19 Thread Hall Stevenson

  Another question I have is about using vim for writing
  e-mails.  I have successfully been able to setup vim
  to wrap at 80 or so...
snip

 the easiest way i know of is typing:
 gqip
 which will reformat the current paragraph.

 gqap reformats all paragraphs i think.  quoting and stuff
 will be preserved as long as '' is set in 'comments' in
 your .vimrc or in the systemwide vimrc (this is the default)

Can you expand on this please ?? Specifically the as long as
'' is set in 'comments' . I use 'par' myself and it usually
does just fine. On occasion though, I've seen it do this to a
paragraph:

 this is an example of what 'par' has   done to a paragraph
and I'm pretty sure  that it shouldn't have ;-)

Hall




Re: Defaulting to inbox on startup

2001-09-19 Thread David T-G

Hall --

...and then Hall Stevenson said...
% 
%  gqap reformats all paragraphs i think.  quoting and stuff
%  will be preserved as long as '' is set in 'comments' in
%  your .vimrc or in the systemwide vimrc (this is the default)
% 
% Can you expand on this please ?? Specifically the as long as
% '' is set in 'comments' . I use 'par' myself and it usually

It's a vim command (gq) and setting (comments); if you have the comments
character(s?) known, then gq commands will strip them out, format, and
put them at the front.


% does just fine. On occasion though, I've seen it do this to a
% paragraph:
% 
%  this is an example of what 'par' has   done to a paragraph
% and I'm pretty sure  that it shouldn't have ;-)

Yeah, I've seen that sort of thing, too.  It won't be fixed with a vim
setting, but I also dunno why par would choke like that.


% 
% Hall


:-D
-- 
David T-G  * It's easier to fight for one's principles
(play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]
http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg!


 PGP signature


Re: Defaulting to inbox on startup

2001-09-19 Thread Justin R. Miller

Thus spake Collin Peters ([EMAIL PROTECTED]):

 Is there any way to have mutt default to either the inbox on startup,
 or default to a folder that has new mail in it?

Check out the command-line options for starting Mutt, in particular
'-Z'.  Although I don't think that will default to your inbox if you
don't have any mail...

 Another question I have is about using vim for writing e-mails.  I
 have successfully been able to setup vim to wrap at 80 or so
 characters.  However, if I edit the message, the word wrapping is not
 preserved.  For example, if I were to edit my first question above and
 add two or three words to it, the line would extend past 80 chars and
 not wrap unless I manually edit it.  Is there a solution for this?

Try this:  

set editor=vim -c 'set tw=72 comments=nb:'

Then, once your email is all typed (or during for that matter), just
highlight a portion with visual block and hit 'gq'.  That should wrap
things nicely, without messing up the stuff that you don't want to wrap.  

-- 
| Justin R. Miller / [EMAIL PROTECTED] / 0xC9C40C31
| Of all the things I've lost, I miss my pants the most.
--

 PGP signature


Re: Defaulting to inbox on startup

2001-09-19 Thread Collin Peters

Thanks guys,

I see the first one was a RTFM. :}  I didn't remember seeing that last time
I RTFM but dem's da breaks.

The gq vim option also does the trick.  Thanks

Collin



Re: Defaulting to inbox on startup

2001-09-19 Thread Collin Peters

One more question on this topic.  I've set my editor command to the one
suggested below but would appreciate a little explanation on the
comments= part.  Particularly the 'nb:' part.  Does this mean if I were
to modify some of the lines below which started with the angle bracket
(), it would auto-format those to 72 chars as well AND keep the
brackets in the correct place?  I tried it and it didn't work but some
of the responses seemed to indicate it would.

On Wed, Sep 19, 2001 at 09:49:02AM -0400, Justin R. Miller wrote:
 Thus spake Collin Peters ([EMAIL PROTECTED]):
 
  Another question I have is about using vim for writing e-mails.  I
  have successfully been able to setup vim to wrap at 80 or so
  characters.  However, if I edit the message, the word wrapping is not
  preserved.  For example, if I were to edit my first question above and
  add two or three words to it, the line would extend past 80 chars and
  not wrap unless I manually edit it.  Is there a solution for this?
 
 Try this:  
 
   set editor=vim -c 'set tw=72 comments=nb:'
 
 Then, once your email is all typed (or during for that matter), just
 highlight a portion with visual block and hit 'gq'.  That should wrap
 things nicely, without messing up the stuff that you don't want to wrap.  
 
 -- 
 | Justin R. Miller / [EMAIL PROTECTED] / 0xC9C40C31
 | Of all the things I've lost, I miss my pants the most.
 --





Re: Defaulting to inbox on startup

2001-09-19 Thread David Rock

On Wed, Sep 19, 2001 at 09:24:42AM +0200, Roberto Suarez Soto wrote:
 
   This is not a question really related to vim, or to Colin's
   message, but ... well, just out of curiosity: how many people
   started using vim as editor just by influence of this list? :-)
   I know I did, because everyone here seemed to use it with great
   success, and maybe others did too :-)

I actually started with Emacs first. I think the tutorial that came with
it is a little better than the one for vim. I also think Emacs has a
slightly more intuitive command set (emphasis on slightly). I started
using vim because with all the different flavors of UNIX I deal with,
vim (vi, actually) was a much more common editor than Emacs. Over time,
I discovered many strange and wonderful things that vim can do. I
especially liked being able to use any tool that can work with stdin and
stdout. To be fair, I don't know how much of the same kind of thing
Emacs is capable of. I still think it's a great editor, but it's
awfully hard to go back ;-)

-- 
David Rock
[EMAIL PROTECTED]

 PGP signature