This is also seems to work:
:s/[\x96]/-/
documented under :help /\]
But I can't find a way to do it the other way around, search for something
and substitute with a hex number (without using C-V).
Regards,
Ag.
> This is also seems to work:
>
> :s/[\x96]/-/
> But I can't find a way to do it the other way around, search for
> something and substitute with a hex number (without using C-V).
We can replace with an expression and use double-quoted string constant
there. It allows entering hexadecimal numbers:
s/something/\="\x96"/
See
:help sub-replace-expression
:help expr-string
Thanks Teemu, I was missing the quotes in the sub-replace-expression.
Regards,
Ag.
> [...]
By the way, your mail client (mutt) keeps adding Re:'s to the Subject
field. In a thread it will go "Re: Re: Re: Re:" etc. By default mutt
recognizes this common subject prefix and does not add new ones. Have
you changed the value of reply_regexp option?
That was tricky to find out (what in the h..l has happened), because I
didn't change the default regexp for a while, in fact I don't thing I
ever touched that variable in the mutt config.
But, I've recently introduced a procmail rule to modify the "Subject"
header, by inserting a tag with the name of the mailing list(s) (if
there is a matched mailing list); so I could tag them easily or limit
the view to specific mailing lists by using the limit command in mutt.
Naturally the default 'reply_regexp', failed to match the tags, see the
subject line after procmail filtering:
Subject: [vim_use] RE: How to specify hex value in substitute command
and the regexp:
reply_regexp="^(re([\\[0-9\\]+])*|aw):[ \t]*"
I've already took measures, extra measures in fact. :)
Besides that I've changed the 'reply_regexp' a bit, I thought I have to
protect my public image and so - as a plus - I've trusted once again the
vim regexp machine, to match and *eliminate* any extra re:'s.
Thanks for noticing.
Regards,
Ag.
> But, I've recently introduced a procmail rule to modify the "Subject"
> header, by inserting a tag with the name of the mailing list(s) (if
> there is a matched mailing list); so I could tag them easily or limit
> the view to specific mailing lists by using the limit command in mutt.
Ah, ok. I just configure procmail to move mailing list messages to
different mailboxes and use mutt's mailboxes command to tell it which
mailboxes receive mail. Like this:
.procmailrc:
:0
* List-Id: <vim_use.googlegroups.com>
vim-use/
.muttrc:
mailboxes =vim-use
Perhaps one should mention as a caveat that this rule is for
Maildir. Otherwise you need locking -- :0: -- and no slash at the
end.
As I am lazy I'm using a recipee that catches most of the lists
I'm subscribed to automatically:
:0
*$ ^List-Post:.*mailto:\/[^@]+
Lists/$MATCH/
c
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
_F R E E_ _V I D E O S_ -->> http://www.blacktrash.org/underdogma/
Thought it'd be useful to point out something I got from the procmail list.
Note: There are [<space><tab>] ranges in the regexes below which might have
been mangled before you see them.
--->8----cut here ----8<---
# originally from http://www.professional.org/procmail/listname_id.rc
#
# Generic Listname identification
# 20030517/1134 SBS Updated to handle quoted Sender text
# 20040210/2140 SBS Optimized to eliminate shell/sed in the fallback
# portion.
# 20080724 karthik added x-list to handle some mailman configs
# First, grab stuff based on common "extra" headers inserted by lists,
# including RFC-2369 and RFC-2919 specified headers, compensating for
# text comments which have been encountered on some lists.
:0
* 9876543210^0 ^(Sender:[ ]*owner-|X-(BeenThere|list):[ ]*|Delivered-To:[ ]*mailing list )\/[-A-Za-z0-9_+]+
* 9876543210^0 ^(List-Post:[ ]*(<mailto:)?|List-Owner:[ ]*(<mailto:)?owner-)\/[-A-Z0-9_+]+
* 9876543210^0 ^Sender:.* List"? <(mailto:)?\/[-A-Z0-9_+]+
{
LISTNAME=$MATCH
}
# The second and third conditions were found in posts from Bart Schaefer
# dated 2002-07-18 - these optimize this fallback recipe so that it
# doesn't require the use of a shell, pipe, and sed to eliminate the -owner
# suffix.
#
# first, get the owner address (if the sender follows that syntax)
# Grab everything up through the last hyphen
# Grab everything except that last hyphen
# This is optimized to be one recipe, since MATCH will assume the set value
# after each condition line, and if the FIRST condition matches, the two that
# follow it definatley should.
:0E
* ^Sender:[ ]*\/[-A-Z0-9_+]+-owner
* MATCH ?? ^^\/.+-
* MATCH ?? ^^\/([^-]|-[^-])+
{
LISTNAME=$MATCH
}
--->8----cut here ----8<---
Karthik
--
GMX Kostenlose Spiele: Einfach online spielen und Spaß haben mit Pastry Passion!
http://games.entertainment.gmx.net/de/entertainment/games/free/puzzle/6169196