Permalink
Browse files

Fixed #34, version 0.3.2

  • Loading branch information...
1 parent ac9f4ac commit 7aa259ac650bfd6639fb5078e364c0aef4bce8fa @beloglazov committed Feb 21, 2016
Showing with 5 additions and 7 deletions.
  1. +2 −2 plugin/online-thesaurus.vim
  2. +2 −4 plugin/thesaurus-lookup.sh
  3. +1 −1 syntax/thesaurus.vim
@@ -1,6 +1,6 @@
" Vim plugin for looking up words in an online thesaurus
" Author: Anton Beloglazov <http://beloglazov.info/>
-" Version: 0.3.1
+" Version: 0.3.2
" Original idea and code: Nick Coleman <http://www.nickcoleman.org/>
if exists("g:loaded_online_thesaurus")
@@ -47,7 +47,7 @@ function! s:Lookup(word)
setlocal buftype=nofile bufhidden=hide
let l:word = substitute(tolower(a:word), '"', '', 'g')
1,$d
- echo "Requesting thesaurus.com to look up the word \"" . l:word . "\"..."
+ echo "Requesting thesaurus.com to look up \"" . l:word . "\"..."
exec ":silent 0r !" . s:path . " " . shellescape(l:word)
exec ":silent! g/\\vrelevant-\\d+/,/^$/!" . s:sort . " -t ' ' -k 1,1r -k 2,2"
if has("win32")
@@ -2,7 +2,7 @@
# Vim plugin for looking up words in an online thesaurus
# Author: Anton Beloglazov <http://beloglazov.info/>
-# Version: 0.3.1
+# Version: 0.3.2
# Original idea and code: Nick Coleman <http://www.nickcoleman.org/>
URL="http://www.thesaurus.com/browse/$(echo $1 | tr ' ' '+')"
@@ -41,9 +41,7 @@ if ! grep -q 'no thesaurus results' "$OUTFILE" && grep -q 'html' "$OUTFILE"; the
else if (index($0, "ttl\">"))
printf " %s\nSynonyms:\n", $3
else if (index($0, "thesaurus.com"))
- printf "%s ", $5
- else if (index($0, "text\">"))
- print $3
+ printf "%s %s\n", $7, $15
}' "$OUTFILE"
else
echo "The word \"${1}\" has not been found on thesaurus.com!"
@@ -1,6 +1,6 @@
" Vim plugin for looking up words in an online thesaurus
" Author: Anton Beloglazov <http://beloglazov.info/>
-" Version: 0.3.1
+" Version: 0.3.2
" Original idea and code: Nick Coleman <http://www.nickcoleman.org/>
if exists("b:current_syntax")

0 comments on commit 7aa259a

Please sign in to comment.