In rec.arts.poems on Mon, 18 Feb 2008 01:02:12 -0800 (PST), Will
Good heavens, the section couldn't be clearer were it interpreted
into Dutch.
#v+
" quackify.vim
"
" Version: 0.4
" Date: 2008-02-18
" Author: Peter J Ross <***@gmail.com>
" Licence: This script is released into the public domain.
"
" Description:
" quackify.vim is intended for use when replying to posts by Will Dockery in
" rec.arts.poems or alt.usenet.kooks. It provides two functions:
" 1. quackify() [keybinding <F9>]: Changes words longer than four letters
" in the first level of quoted text and the Subject: line to quacks.
" 2. crosspost() [keybinding <F10>]: Changes the Newsgroups line to
" something appropriate.
"
" Installation:
" Save the script in $HOME/.vim/plugin/ or the equivalent directory for your
" operating system. It will be loaded automatically when you start vim.
"
" Note:
" The line numbers, ranges and quoted-text detection work with my slrn
" settings. It may be necessary to change them if you use a different
" newsreader.
"
" Bugs: probably plenty, since this is the first vim plugin I've written. Let
" me know about them.
noremap <F9> :sil call <SID>quackify()<CR>
noremap <F10> :sil call <SID>crosspost()<CR>
fun! s:quackify()
14,$g/^>[^>]/s/\<Dockery\>/QQwd/ge
14,$g/^>[^>]/s/\<Zorro\>/QQzo/ge
14,$g/^>[^>]/s/\<my poems\=\>/Qqus/ge
14,$g/^>[^>]/s/\<My poems\=\>/QQus/ge
14,$g/^>[^>]/s/\(\l\{4,}\)n't\>/\1 not/ge
14,$g/^>[^>]/s/\<\u\l\{2,}ed\>/QQed/ge
14,$g/^>[^>]/s/\<\u\l\{2,}[oe]rs\>/QQrs/ge
14,$g/^>[^>]/s/\<\u\l\{2,}[oe]r\>/QQer/ge
14,$g/^>[^>]/s/\<\u\l\{2,}ly\>/QQly/ge
14,$g/^>[^>]/s/\<\u\l\{2,}[ai]ble\>/QQle/ge
14,$g/^>[^>]/s/\<\u\l\{2,}[^us']s\>/QQs/ge
14,$g/^>[^>]/s/\<\u\l\{2,}ing\>/QQng/ge
14,$g/^>[^>]/s/\<\u\l\{2,}ness\>/QQns/ge
14,$g/^>[^>]/s/\<\u\l\{2,}[^l]y\>/QQy/ge
14,$g/^>[^>]/s/\<\w\{3,}ed\>/Qqed/ge
14,$g/^>[^>]/s/\<\w\{3,}[oe]rs\>/Qqrs/ge
14,$g/^>[^>]/s/\<\w\{3,}[oe]r\>/Qqer/ge
14,$g/^>[^>]/s/\<\w\{3,}ly\>/Qqly/ge
14,$g/^>[^>]/s/\<\w\{3,}[ai]ble\>/Qqle/ge
14,$g/^>[^>]/s/\<\w\{3,}[^us']s\>/Qqs/ge
14,$g/^>[^>]/s/\<\w\{3,}ing\>/Qqng/ge
14,$g/^>[^>]/s/\<\w\{3,}ness\>/Qqns/ge
14,$g/^>[^>]/s/\<\w\{3,}[^l]y\>/Qqy/ge
14,$g/^>[^>]/s/\<\u\a\{4,}\>/Quack/ge
14,$g/^>[^>]/s/\<\l\{5,}\>/quack/ge
14,$g/^>[^>]/s/\<\CQqed\>/quacked/ge
14,$g/^>[^>]/s/\<\CQqer\>/quacker/ge
14,$g/^>[^>]/s/\<\CQqrs\>/quackers/ge
14,$g/^>[^>]/s/\<\CQqly\>/quackly/ge
14,$g/^>[^>]/s/\<\CQqle\>/quackable/ge
14,$g/^>[^>]/s/\<\CQqs\>/quacks/ge
14,$g/^>[^>]/s/\<\CQqng\>/quacking/ge
14,$g/^>[^>]/s/\<\CQqns\>/quackiness/ge
14,$g/^>[^>]/s/\<\CQqy\>/quacky/ge
14,$g/^>[^>]/s/\<\CQQed\>/Quacked/ge
14,$g/^>[^>]/s/\<\CQQer\>/Quacker/ge
14,$g/^>[^>]/s/\<\CQQrs\>/Quackers/ge
14,$g/^>[^>]/s/\<\CQQly\>/Quackly/ge
14,$g/^>[^>]/s/\<\CQQle\>/Quackable/ge
14,$g/^>[^>]/s/\<\CQQs\>/Quacks/ge
14,$g/^>[^>]/s/\<\CQQng\>/Quacking/ge
14,$g/^>[^>]/s/\<\CQQns\>/Quackiness/ge
14,$g/^>[^>]/s/\<\CQQy\>/Quacky/ge
14,$g/^>[^>]/s/\<\CQQwd\>/Dreckery/ge
14,$g/^>[^>]/s/\<\CQQzo\>/Zah-roooow/ge
14,$g/^>[^>]/s/\<\CQqus\>/my unspeakable shit/ge
14,$g/^>[^>]/s/\<\CQQud\>/My unspeakable shit/ge
14,$g/^>[^>]/s/\<an quack/a quack/ge
14,$g/^>[^>]/s/\<an\n> quack/a\r> quack/ge
14,$g/^>[^>]/s/\<it quack\>/ quacks/ge
14,$g/^>[^>]/s/\<it\n> quack\>/it\r> quacks/ge
14,$g/^>[^>]/s/\<he quack\>/he quacks/ge
14,$g/^>[^>]/s/\<he\n> quack\>/he\r> quacks/ge
14,$g/^>[^>]/s/\<she quack\>/she quacks/ge
14,$g/^>[^>]/s/\<she\n> quack\>/she\r> quacks/ge
14,$g/^>[^>]/s/\>,/, apparently,/e
14,$g/^>[^>]/s/\>\.\n>\n/,\r> as many would agree.\r>\r/e
3s/\<Dockery\>/QQwd/ge
3s/\<Zorro\>/QQzo/ge
3s/\<\u\l\{2,}ed\>/QQed/ge
3s/\<\u\l\{2,}[oe]rs\>/QQrs/ge
3s/\<\u\l\{2,}[oe]r\>/QQer/ge
3s/\<\u\l\{2,}ly\>/QQly/ge
3s/\<\u\l\{2,}[ai]ble\>/QQle/ge
3s/\<\u\l\{2,}[^us]s\>/QQs/ge
3s/\<\u\l\{2,}ing\>/QQng/ge
3s/\<\u\l\{2,}ness\>/QQns/ge
3s/\<\u\l\{2,}[^l]y\>/QQy/ge
3s/\<\w\{3,}ed\>/Qqed/ge
3s/\<\w\{3,}[oe]rs\>/Qqrs/ge
3s/\<\w\{3,}[oe]r\>/Qqer/ge
3s/\<\w\{3,}ly\>/Qqly/ge
3s/\<\w\{3,}[ai]ble\>/Qqle/ge
3s/\<\w\{3,}[^us]s\>/Qqs/ge
3s/\<\w\{3,}ing\>/Qqng/ge
3s/\<\w\{3,}ness\>/Qqns/ge
3s/\<\w\{3,}[^l]y\>/Qqy/ge
3s/\<\u\a\{4,}\>/Quack/ge
3s/\<\l\{5,}\>/quack/ge
3s/\<\CQqed\>/quacked/ge
3s/\<\CQqrs\>/quackers/ge
3s/\<\CQqer\>/quacker/ge
3s/\<\CQqly\>/quackly/ge
3s/\<\CQqle\>/quackable/ge
3s/\<\CQqs\>/quacks/ge
3s/\<\CQqng\>/quacking/ge
3s/\<\CQqns\>/quackiness/ge
3s/\<\CQqy\>/quacky/ge
3s/\<\CQQed\>/Quacked/ge
3s/\<\CQQrs\>/Quackers/ge
3s/\<\CQQer\>/Quacker/ge
3s/\<\CQQly\>/Quackly/ge
3s/\<\CQQle\>/Quackable/ge
3s/\<\CQQs\>/Quacks/ge
3s/\<\CQQng\>/Quacking/ge
3s/\<\CQQns\>/Quackiness/ge
3s/\<\CQQy\>/Quacky/ge
3s/\<\CQQwd\>/Dreckery/ge
3s/\<\CQQzo\>/Zah-roooow/ge
3s/\<an quack\>/a quack/ge
3s/\<it quack\>/it quacks/ge
3s/\<he quack\>/he quacks/ge
3s/\<she quack\>/she quacks/ge
3s/^Quack/Subject/e
norm 9G
endfun
fun! s:crosspost()
1s/\(Newsgroups: \).*/\1rec.arts.poems,alt.idiot.will-dockery,alt.usenet.kooks/e
norm 9G
endfun
#v-
--
PJR :-)
<http://pjr.lasnobberia.net/>