Tuesday, November 7, 2017

Re: Handling differences in different plugins for the same type of operation

On Monday, 06 November, 2017 at 19:23:32 GMT, Patrik Iselind wrote:
>Even if these work they are no where close to a uniform interface. How do you guys handle such issues, stick with the differences, remap until insane, or something else?
>
>I think it would be great if i could have a uniform interface to use for refactoring regardless of which language i happen to use at the moment. Remembering three different mappings for refactoring and when each one applies steal my focus from what i would like to do.

When I was working with both Git (fugitive) and Subversion (svnj), it was very convenient to have my own mappings that would do the right thing depending on context. I had mappings that would call a function that would, depending on whether I was in a Git or Subversion repository, call the appropriate plugin's respective command.

For example, <leader>vb would end up calling either :Gblame (fugitive) or :SVNBlame (svnj), and I didn't need to think about it.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment