home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / share / elvis-2.2_0 / scripts / dict.ex < prev    next >
Encoding:
Text File  |  2004-02-22  |  505 b   |  18 lines

  1. " Use the "dict" program to fetch the definition of a word
  2. alias readDICT {
  3.     local nolock
  4.     r !dict --html "!2"
  5.     try %s/{\([^,}]*\), \([^}]*\)}/{\1}, {\2}/g
  6.     try %s/{\([^,}]*\), \([^}]*\)}/{\1}, {\2}/g
  7.     try %s/{\([^,}]*\), \([^}]*\)}/{\1}, {\2}/g
  8.     try %s/{\(\w[[:alpha:] .]*\)}/<a href="dict:\1">\1<\/a>/g
  9.     try %s/[Hh][Tt][Tt][Pp]:\/\/[^ ,>")&]*/<a href="&">&<\/a>/g
  10.     set bufdisplay=html
  11. }
  12. alias dict {
  13.     " Show the definition of a term in a new window
  14.     local w="!*"
  15.     let w =~ s/ /\\ /g
  16.     eval sp dict:(w)
  17. }
  18.