Skip to content

Releases: Ron89/thesaurus_query.vim

Updates on Backends

09 Nov 08:52
830a20e
Compare
Choose a tag to compare
  • Added French Backends using online source cnrtl.fr and synonymo.fr
  • Added German synonym backend based on openthesaurus.de, backend identifier openthesaurus_de
  • Fixed some bugs
  • Added datamuse_en into default backends list.
  • Removed defunc backends such as thesaurus.com and woxikon.de from default backend list.

v0.6.2

17 Jul 07:12
Compare
Choose a tag to compare

Added

- added Russian synonym backend based on `yarn-synsets.csv`, backend
  identifier `yarn_synsets`
- variable `g:tq_python_version` to force use user determined version of
  Python, provided the version is supported

Fixed

- Fixed problem caused by Woxikon html design change.

Add Chinese Backend

02 Oct 04:32
Compare
Choose a tag to compare

Added

  • Chinese thesaurus query support based on [[https://github.com/shijiebei2009/Algorithms/blob/master/src/main/resources/cilin.txt][cilin.txt]]
  • backend forward/backward switching functionality (only available in normal
    mode Candidate Choosing Interface)
  • =openoffice_en= backend, using OpenOffice's thesaurus extension as thesaurus
    source.

Fixed

  • Bugs in miscounting utf-8 character length when replacing existing phrase with
    user chosen one.
  • Bugs in source checking logic of =mthesaur_txt= routine when variable
    =&thesaurus= is searched

Removed

  • word_list cache saving results found in previous query sessions

dynamic backend managing; split buffer display improvement; phrase replacing algorithm improvement

24 Jul 08:03
Compare
Choose a tag to compare

V0.5 Changelog

Changed

  • Improved syntax of =part of speech= in split synonym display
  • Improved split window display for synonym candidates.
  • Implemented dynamic backend-managing mechanism. Now adding new backends
    is as simple as dropping the backend file into folder
    =./autoload/thesaurus_query/backends=

Fixed

  • Fix multiple bugs encountered when querying for words/phrases surrounded
    by non-space symbols or contain non-space symbols.
  • String =zero length field in format= issue with Python2.6.

German support, Timeout mechanism, Python3 support and more

01 Jun 04:36
Compare
Choose a tag to compare

V0.4 changelog

Added

- Timeout feature for shorter waiting time. Timeout will not demote the
  backend.
- =<Leader>cs= for thesaurus_query functionality.
- Add German(=de=) support (Issue #12)
- Add Python3 support, and set as default. Python2 still supported.

Changed

- Due to performance reasons, removed =datamuse_com= from default backend
  list.
- Improve coloring for candidate choosing window.
- Now visual mode synonym query also support replacing feature. And the
  replacing feature is set to default.
- change =g:tq_use_python= to =s:tq_use_python=.
- default value for =g:tq_language= become list, =g:tq_language = ['en']=

Depreciated

- use of =<LocalLeader>cs=.

Fixed

- Exclude Tab =\\t= from being recognized as part of a word in Insert Mode
  query.
- Insert mode auto-complete ineffective in Python3 due to behavior
  difference of =map= in Python3 and Python2.
- the issue that makes redefining variable mid-session ineffective
- fix out-of-boundary exception when query empty string with completefunc
  (insert mode completion)

v0.3.0

23 Apr 06:11
Compare
Choose a tag to compare

Thesaurus Query Plugin v0.3 made two changes:

  • added multi-language support
  • added insert-mode auto-complete like word replacing interface(invoked by
    ctrl-x ctrl-u), complementing the existing normal-mode spell like word
    replacing interface.

Detailed changelog is attached below.

CHANGELOG from v0.2.0

Added

  • multi-language thesaurus query support, currently English('en') and
    Russian('ru') are supported
  • b:tq_language and g:tq_language to setup which language source you
    prefer the plugin to query
  • use completefunc for insertmode autocomplete (Issue #7)
  • variable let g:tq_use_vim_autocomplete = 1 to activate completefunc

Changed

  • (internal) words and query results in Python are now all utf-8 decoded
  • made plugin into autoload plugin to speed-up vim startup

Depreciated

  • all variables starting with g:thesaurus_query#, replacing the prefix of
    all of them by g:tq_

Removed

  • variable g:thesaurus_query#map_keys, use g:tq_map_keys instead.

Fixed

  • fix out-of-bound user input exception in candidate choosing.
  • add KeyboardInterrupt exception handler for candidate choosing.(closes
    Issue #8 )

v0.2.0

25 Mar 07:09
Compare
Choose a tag to compare

V0.2 Changelog

  • Added
    • datamuse query routine
    • implement backend enable/disable by g:thesaurus_query#enabled_backends
    • add query system reset function :ThesaurusQueryReset
  • Depreciated
    • use of variable g:thesaurus_query#use_local_thesaurus_source_as_primary
  • Removed
    • variable g:thesaurus_query#use_alternative_backend

thesaurus_query.vim

13 Mar 14:32
Compare
Choose a tag to compare

Change_log since v0.1.0:

  • fixed on-demand query(:Thesaurus [your_word]);
  • cleaned global scope variables;
  • add feature: lowering query priority of mal-functional backend;
  • recognize case(all upper case | first letter upper case | all lower case) of
    phrase to be replaced, and adjust candidate list accordingly;
  • refined synonym replacing interface: smart line wrap based on current window
    width.

thesaurus_query.vim

03 Mar 20:13
Compare
Choose a tag to compare
thesaurus_query.vim Pre-release
Pre-release

The first release of thesaurus_query.vim, written mainly in Python.

What It Does

thesaurus_query.vim is made for a simple purpose: to create a simple,
sensible and functional interface for user to query synonym of a word and
replace it with user chosen candidate if that word is obtained from under
cursor.

So essentially, this plugin can query synonyms from words

  • under cursor (<LocalLeader>cs in Normal mode)
  • covered in visual mode (<LocalLeader>cs in Visual mode)
  • typed in by user in command mode (:Thesaurus [your_word])

Currently for word input from first case, a candidate list of found synonyms
will be generated, and user may replace the word under cursor with chosen
candidate or cancel the operation.

To maximize the query experience, two query backends were created:

  • Online Query Backend: querys from Thesaurus.com for
    synonym, so Internet connection is required for this backend's
    functionality.
  • Local query Backend: querys with local mthesaur.txt file. For this
    backend to work, be sure to download the file from gutenberg.org and
    place it under "~/.vim/thesaurus".

By default, query will be performed by Online Query Backend first. Only when no
synonym is found from Thesaurus.com, either due to the lack of
Internet connection or the word is not included, the plugin will turn to the
Local Query Backend for further query. This query sequence can be reversed. For
detail, please refer to
documentation.

How to Install

Install using plugin managers is prefered. Use your plugin manager of choice:

  • Pathogen
    • git clone https://github.com/ron89/thesaurus_query.vim ~/.vim/bundle/thesaurus_query.vim
  • Vundle
    • Add Bundle 'ron89/thesaurus_query.vim ' to .vimrc
    • Run :BundleInstall
  • NeoBundle
    • Add NeoBundle 'ron89/thesaurus_query.vim' to .vimrc
    • Run :NeoBundleInstall
  • vim-plug
    • Add Plug 'ron89/thesaurus_query.vim' to .vimrc
    • Run :PlugInstall

The Online Query Backend is functional by default. So without further
customization, the plugin should be good to go. However, if user want the Local
Query Backend to be functional as well, some further steps might be needed.

Configure for Local Query Backend

Download mthesaur.txt(around 24MB) file from
gutenberg.org, and place it under
folder "~/.vim/thesaurus". If user place the file elsewhere, be sure to let
this plugin know the location of your mthesaur.txt file by adding the line

    let g:thesaurus_query#mthesaurus="/directory/to/your/mthesaur.txt

into your .vimrc.

I'm not satisfied with Default experience, how can I customize it

Currently, 8 global variables and 3 commands created for you to customize
plugin's detailed behaviors. Including backend query sequence, keymappings and
result truncations. Some are described in
README.md.
And all of them are documented in detail in
documentation.