PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > mutt + mailings list ( + vim)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

mutt + mailings list ( + vim)

Réponse
 
LinkBack Outils de la discussion
Vieux 21/04/2008, 21h50   #1
Alex Samad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut mutt + mailings list ( + vim)

Hi

2 questions for the list

1) I keep all my mailing lists in different folders, is it possible to
setup mutt to automatically place the list address in the TO field when
I am in that folder and then to go back to normal when I leave that
folder

2) I use vim to edit me emails, how do I write a script such that it
takes the highlighted lines deletes them and then inserts

[snip]


Thanks

Alex

--
"It follows that any commander in chief who undertakes to carry out a plan
which he considers defective is at fault; he must put forth his reasons,
insist of the plan being changed, and finally tender his resignation rather
than be the instrument of his army's downfall."
-- Napoleon, "Military Maxims and Thought"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIDPw/kZz88chpJ2MRAq1nAKD7sGuu2R0JLthri1B2mstXXk5IIwCfWU Rc
h/UOwphqFrYFNuFmO1S0+DQ=
=Ct/o
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 21/04/2008, 21h50   #2
Tzafrir Cohen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)

On Tue, Apr 22, 2008 at 06:42:39AM +1000, Alex Samad wrote:
> Hi
>
> 2 questions for the list
>
> 1) I keep all my mailing lists in different folders, is it possible to
> setup mutt to automatically place the list address in the TO field when
> I am in that folder and then to go back to normal when I leave that
> folder


Yes, it's possible (using folder hooks). But I usually use shift-l for
list-reply when I want to reply to the list.

>
> 2) I use vim to edit me emails, how do I write a script such that it
> takes the highlighted lines deletes them and then inserts


Hilighted? Where?

--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 21/04/2008, 22h50   #3
Alex Samad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)

On Mon, Apr 21, 2008 at 08:47:16PM +0000, Tzafrir Cohen wrote:
> On Tue, Apr 22, 2008 at 06:42:39AM +1000, Alex Samad wrote:
> > Hi
> >
> > 2 questions for the list
> >
> > 1) I keep all my mailing lists in different folders, is it possible to
> > setup mutt to automatically place the list address in the TO field when
> > I am in that folder and then to go back to normal when I leave that
> > folder

>
> Yes, it's possible (using folder hooks). But I usually use shift-l for
> list-reply when I want to reply to the list.

yep know about shift-l, but I was thinking about new email's, I will
looking folder hooks
>
> >
> > 2) I use vim to edit me emails, how do I write a script such that it
> > takes the highlighted lines deletes them and then inserts

>
> Hilighted? Where?


so whilst viewing an email, I press shift-l, this starts vim with the
emails, I then use up and down arrows and v to highlight some text, I
would then like to press <some key combo> and have the text replaced by
<cr>[snip]<cr>



>
> --
> Tzafrir Cohen | tzafrir@jabber.org | VIM is
> http://tzafrir.org.il | | a Mutt's
> tzafrir@cohens.org.il | | best
> ICQ# 16849754 | | friend
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


--
"Confound these ancestors.... They've stolen our best ideas!"
-- Ben Jonson

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIDQr4kZz88chpJ2MRAq2fAJ9h/HR/SJy5ldi03xx5kmPwcKb1AQCeLqNI
I3iS2ICbk2sGRnzgxwZ8Od4=
=Pl8N
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 22/04/2008, 00h10   #4
hh.eu@gmx.de
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)

Am 21.04.2008 um 23:45 schrieb Alex Samad:
> so whilst viewing an email, I press shift-l, this starts vim with the
> emails, I then use up and down arrows and v to highlight some text, I
> would then like to press <some key combo> and have the text
> replaced by
> <cr>[snip]<cr>


I haven't used this before, but try putting something like this into
your ~/.vimrc file:

map <C-S-F1> d<Esc>i<CR>[snip]<CR><Esc>

This will create a shortcut for Ctrl+Shift+F1 (think of a better one, I
used this for testing to make sure I didn't interfere with the
defaults).

You make a selection in vim, i.e. press Shift+v, then go down a few
lines, and then press the shortcut, which will delete the selection (d),
go into insert mode (i) and put in your text and then leave insert mode
again (<Esc>).

So actually it's pretty easy. Type

: key-mapping

in vim for more info.

You'll have to play around a bit to see how you want things when you
don't select full lines.

-Moritz



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 22/04/2008, 08h10   #5
Alex Samad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)

On Tue, Apr 22, 2008 at 01:04:20AM +0200, hh.eu@gmx.de wrote:
> Am 21.04.2008 um 23:45 schrieb Alex Samad:
>> so whilst viewing an email, I press shift-l, this starts vim with the
>> emails, I then use up and down arrows and v to highlight some text, I
>> would then like to press <some key combo> and have the text replaced by
>> <cr>[snip]<cr>

>
> I haven't used this before, but try putting something like this into
> your ~/.vimrc file:
>
> map <C-S-F1> d<Esc>i<CR>[snip]<CR><Esc>
>
> This will create a shortcut for Ctrl+Shift+F1 (think of a better one, I
> used this for testing to make sure I didn't interfere with the
> defaults).
>
> You make a selection in vim, i.e. press Shift+v, then go down a few
> lines, and then press the shortcut, which will delete the selection (d),
> go into insert mode (i) and put in your text and then leave insert mode
> again (<Esc>).


thanks for that, exactly what I want


>
> So actually it's pretty easy. Type
>
> : key-mapping
>
> in vim for more info.
>
> You'll have to play around a bit to see how you want things when you
> don't select full lines.
>
> -Moritz
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.orgwith a
> subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
>


--
"President Musharraf, he's still tight with us on the war against terror, and that's what I appreciate. He's a -- he understands that we've got to keep Al Qaeda on the run, and that by keeping him on the run, it's more likelywe will bring him to justice."

- George W. Bush
08/22/2002
Ruch, OR

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIDY5RkZz88chpJ2MRAjFRAJ9wUhwZD2XopatkCN2DQd py1x5W2wCfZxC4
0h/AUZ1Yc0+uT9Ehem8E8Sw=
=RdPX
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 22/04/2008, 15h40   #6
Brian McKee
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)


On 21-Apr-08, at 7:04 PM, hh.eu@gmx.de wrote:

> Am 21.04.2008 um 23:45 schrieb Alex Samad:
>> so whilst viewing an email, I press shift-l, this starts vim with the
>> emails, I then use up and down arrows and v to highlight some text, I
>> would then like to press <some key combo> and have the text
>> replaced by
>> <cr>[snip]<cr>

[snippage]
> map <C-S-F1> d<Esc>i<CR>[snip]<CR><Esc>

[snippage]
> You make a selection in vim, i.e. press Shift+v, then go down a few
> lines, and then press the shortcut, which will delete the selection
> (d),
> go into insert mode (i) and put in your text and then leave insert
> mode
> again (<Esc>).

[snippage]
> You'll have to play around a bit to see how you want things when you
> don't select full lines.


Wouldn't 'c' be better than 'd<Esc>i' ?

Brian


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Verify this email or encrypt your email for free - see gnupg.org

iD8DBQFIDfaYGnOmb9xIQHQRAsToAKCSGg6tZ7WfRQU59L1HLT W36waZlgCg1Ww9
y8wlgcBrWU11a9ok4KRmi3M=
=zHc6
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 26/04/2008, 00h10   #7
Alex Samad
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: mutt + mailings list ( + vim)

On Tue, Apr 22, 2008 at 10:30:48AM -0400, Brian McKee wrote:
>
> On 21-Apr-08, at 7:04 PM, hh.eu@gmx.de wrote:
>
>> Am 21.04.2008 um 23:45 schrieb Alex Samad:
>>> so whilst viewing an email, I press shift-l, this starts vim with the
>>> emails, I then use up and down arrows and v to highlight some text, I
>>> would then like to press <some key combo> and have the text replaced
>>> by
>>> <cr>[snip]<cr>

> [snippage]
>> map <C-S-F1> d<Esc>i<CR>[snip]<CR><Esc>

> [snippage]
>> You make a selection in vim, i.e. press Shift+v, then go down a few
>> lines, and then press the shortcut, which will delete the selection
>> (d),
>> go into insert mode (i) and put in your text and then leave insert
>> mode
>> again (<Esc>).

> [snippage]
>> You'll have to play around a bit to see how you want things when you
>> don't select full lines.

>
> Wouldn't 'c' be better than 'd<Esc>i' ?




For some reason <C-S-F1> did not register on so I tried it with ^[[23^
(got this from the manual, I type ctrl-V and then the keycombo)

>
> Brian
>




--
"Ah, you know the type. They like to blame it all on the Jews or the Blacks,
'cause if they couldn't, they'd have to wake up to the fact that life's onebig,
scary, glorious, complex and ultimately unfathomable crapshoot -- and the only
reason THEY can't seem to keep up is they're a bunch of misfits and losers."
-- an analysis of neo-Nazis and such, Badger comics

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIEmQPkZz88chpJ2MRArAwAJ4w+3UGQwm4roLTZ7QVxR KPRqEwdwCeNtK5
+m2BgSVmcjOfksSmk2fsyOw=
=1gRQ
-----END PGP SIGNATURE-----

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h38.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,18891 seconds with 15 queries