echuraev / translate-shell.vim

Translate-shell.vim is a plugin for translating text without leaving Vim.
GNU General Public License v3.0
69 stars 5 forks source link

Unify :Trans and :TransVisual #5

Closed oblitum closed 5 years ago

oblitum commented 5 years ago

Hi, I'm just opening this so to not forget about it and leave the suggestion behind: https://github.com/echuraev/translate-shell.vim/issues/3#issuecomment-432944249.

As commented previously, this teaches how one can check if the command is being called with a range or not: https://stackoverflow.com/a/18897835/1000282. The idea is to operate on the range if there's one, or just the word under the cursor if there's no range.

If I implement it I'll turn the issue into a pull-request, otherwise if you implement this earlier, feel free to close it :)

echuraev commented 5 years ago

Thank you Francisco! Feel free to implement this feature.

I'm not sure that I'll have free time till the next week. I think this task should not take a lot of time. It is only necessary to change several functions in autoload/trans.vim and update two files: plugin/trans.vim and test/base-translation.vader.

Please, let me know if you'll start to work on this feature :)

echuraev commented 5 years ago

@oblitum Thank you for the link it realy helps me. Unified :Trans and :TransVisual in release 2.0.

oblitum commented 5 years ago

Nice :)