Thomas A.Lowery on Mon, 26 Nov 2001 10:34:18 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Mystery Programming Language


Walt, is the syntax of your puzzle code correct?

This smells of vim, looks like vim, but isn't?  Is it tool embedded
language?

<snip> from spell.vim

:function! ProposeAlternatives()
:  let @_=CheckSpellLanguage()
:  let alter=system("echo ".expand("<cword>")." | ispell -a -d ".b:language." | sed -e '/^$/d' -e '/^[@*#]/d' -e 's/.*: //' -e 's/,//g' | awk '{ for(i=1;i<=NF;i++) if(i<10) printf \"map %d :let r=SpellReplace(\\\"%s\\\")<CR> | echo \\\"%d: %s\\\" | \",i,$i,i,$i; }'")
:  if alter !=? ""
:    echo "Checking ".expand("<cword>").": Type 0 for no change, r to replace or"
:    exe alter
:    map 0 <cr>:let r=SpellRemoveMappings()<cr>
:    map r 0gewcw
:  else
:    echo "no alternatives"
:  endif
:endfunction


Tom

On Fri, Nov 23, 2001 at 05:47:26PM -0500, Walt Mankowski wrote:
> This message was posted in error to mutt-users a few days ago.  Can
> anyone guess what programming language he's using?
> 
> Walt
> 
> P.S.  If you reply, please include some spoiler space so that other
> people can guess.  Thanks.
> 
> ----- Forwarded message from Tim Johnson <tim@johnsons-web.com> -----
> 
> Date: Tue, 20 Nov 2001 17:59:43 -0900
> From: Tim Johnson <tim@johnsons-web.com>
> To: mutt-users@mutt.org
> Subject: Reading a Function parameter
> 
> Hello All:
> 	I have written a function that is meant to process
> a word behind the cursor.
> The objective is to press Ctrl-d at the end of a word
> with the following result:
> 
> # starting with
> test
> # press Ctrl-d at end of the word and get
> cgi/?? 'test test
> 
> # here is the function that I have written:
> function! Debug()
>  let wrd=expand("<cWORD>")
>   exe "norm! bicgi/?? '\<Esc>ea \<cWord> \<Esc>"
> endfunction
> 
> # the result of this is 
> cgi/?? 'test <cWORD> 
> # instead of
> cgi/?? 'test test
> 
> How do I properly translate <cWORD> to it's
> value.
> 
> Pointers to documentation and examples would be
> welcome.
> Cheers



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

**Majordomo list services provided by PANIX <URL:http://www.panix.com>**
**To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**