beloglazov / vim-online-thesaurus

A Vim plugin for looking up words in an online thesaurus
Apache License 2.0
247 stars 21 forks source link

Replace searched word with thesaurus window selection? #33

Closed isbadawi closed 8 years ago

isbadawi commented 9 years ago

It would be cool if, after searching for the current word, I could choose a replacement in the thesaurus window, and have it replace the word I searched for in the original window. Doing this manually takes a few steps -- select, yank, close or switch window, and paste over the original word. It might even be faster to just type out the replacement.

I am thinking e.g. a buffer-local mapping in the thesaurus window to choose the (possibly multi-word) term under the cursor, carry out the replacement, and close the thesaurus window. Perhaps <cr> as a default, similar to running a command in the cmdline window.

I'm not facile enough with vimscript to know how simple that is to implement. I might give it a shot if I have time, but if this is easy then consider this a feature request.

beloglazov commented 9 years ago

Thanks for the suggestion! It sounds doable, but I don't really have time to work on this at the moment. I'd be happy to accept a PR :)

Ron89 commented 8 years ago

I sort of did what he asked... but I basically altered it into a python based plugin, so I made it into a new plugin. https://github.com/Ron89/thesaurus_query.vim

beloglazov commented 8 years ago

Thanks @Ron89! I think this issue can be closed now, and people who need this functionality can use your plugin.