3 ms·
Do you know if it’s possible in vim to show hover for an arbitrary selection? A visual selection?
by dmitryminkovsky 6y ago
Do you know if it’s possible in vim to show hover for an arbitrary selection? A visual selection?
- JNRowe 6y agoLike many things in vim it depends on whether you wish to write it ;) You can define your own popup(:h bexpr) however you feel, including per-filetype or buffer. Instead of simply operating on the variables it defines to you can also work upon the selection by querying the register(:h quotestar) instead. As an example, I like displaying wordnet¹ popups when writing prose. Occasionally, I'll also dump diction² output in to a popup too. However, I do think that using messages(:h :messages) might make more sense for selection info in general. That way you can select a text, call a map to display information, and still easily recall that data when you're in another place via :messages at a later time. Depends entirely on your use case, and once again how interested in writing the functionality you are. ¹ http://wordnet.princeton.edu/ http://wordnet.princeton.edu/ ² http://www.gnu.org/software/diction/diction.html http://www.gnu.org/software/diction/diction.html
- dmitryminkovsky 6y agoThank you! Will add this to my Vim to-do.