Article View: news.software.readers
Article #225188[OT] verbatim markers (Was: [slrn] Quoting 'verbatim' text)
From: Troy Piggins
Date: Fri, 29 Aug 2008 08:30
Date: Fri, 29 Aug 2008 08:30
58 lines
3138 bytes
3138 bytes
* Troy Piggins wrote :
> * andrew wrote :
>> Hi,
>>
>> I was wondering if there was any general consensus of the best way of
>> presenting 'verbatim' text in a newspost? I am aware that slrn has
>> ? exclusively the ability to present as follows:
>>
>> #v+
>> --- src/version.c (revision 294)
>> +++ src/version.c (working copy)
>> @@ -43,7 +43,8 @@
>> #include "art.h"
>> #include "snprintf.h"
>> #v-
>>
>> and manipulate this with { or [ according to .slrnrc settings but this
>> would be lost on other less able news clients.
Not sure what mail and text editing software you use. I use mutt
and vim. Thought I'd share some tools I've created and/or
borrowed.
.vimrc extract:
-----8<-----
" add verbatim marks
" visually select block of text to surround with verbatim marks
" then hit ,v to add marks at each end of block
vnoremap ,v "zdi#v+<C-R>z#v-<ESC>
-----8<-----
.muttrc extract:
-----8<-----
color body magenta default "^\#v[-+]"
-----8<-----
display filter for mutt, called from .muttrc as
set display_filter='$HOME/bin/display-filter'
~/bin/display-filter extract:
-----8<-----
#!/bin/bash
sed -e '
# adds ansi colour escapes to text between verbatim marks
# so can colour more than one line.
/^#v+/,/^#v-/s/.*/\x1B[35m&/
s/\(.*\)#v+/\1/
s/\(.*\)#v-/\1/
'
-----8<-----
Thought someone other than me might find this useful.
--
Troy Piggins | http://piggo.com/~troy/slrn ___ | __ __
|___ | |/ |/ |
___| | | | |
Technical Details
Message-ID:
<20080829181811.640@usenet.piggo.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!news.motzarella.org!motzarella.org!not-for-mailReferences:
<20080829154459.775@ilium.andrews-corner.org> <20080829161227.721@usenet.piggo.com>Show Full Headers
Complete Article Headers
Message-ID: <20080829181811.640@usenet.piggo.com> Subject: [OT] verbatim markers (Was: [slrn] Quoting 'verbatim' text) Date: Fri, 29 Aug 2008 18:30:38 +1000 From: Troy Piggins <usenet-0808@piggo.com> References: <20080829154459.775@ilium.andrews-corner.org> <20080829161227.721@usenet.piggo.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!news.motzarella.org!motzarella.org!not-for-mail Newsgroups: news.software.readers Organization: A noiseless patient Spider Lines: 58 Reply-To: usenet-0808@piggo.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: feeder.motzarella.org U2FsdGVkX195VfmMxvh8ZzYFua48aWL5m8TGi4Giy2oYz2CrgKjRL5Tr1eCaTktGZR4IcrY5CKGsi1aoRNruC7puXW9Qekp3lvlVVL/tCKpc67LFeOSvAapX1BHTZoPMQjyMOodi/KXLEvnvp+3NcQ== X-Complaints-To: Please send complaints to abuse@motzarella.org with full headers NNTP-Posting-Date: Fri, 29 Aug 2008 08:30:46 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1/bacjlgCY7G4WylshdswSlU2N7DIe/ix2WE2YEOOGsvA== X-NNTP-Proxy: Leafnode-2 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/) Cancel-Lock: sha1:rZtZvJ03ls6Tg9PRuBnFPqSro64= User-Agent: slrn/pre0.9.9p1-7/rt/co (GNU/Linux)