| autoload | ||
| plugin | ||
| LICENSE | ||
| README.md | ||
docviewer.vim
Opens a terminal docviewer for a given search term
Why?
A couple of programming lanaguages I use have a terminal doc viewer.
In order to make it easier while in vim, I've created this plugin.
Config
In your filetype vim script you just want to set the buffer local variable
b:docviewer_search_cmd to the shell command needed to search for a term in
the document lookup program. The term will automatically be added to the end of
this string.
Then running the vim command VDoc [term] to open the doc viewer.
Extra
The terminal window that is opened is configure such that h,j,k,l will
enter insert mode, submit the corresponding key, and leave insert mode. This is
primarily so you don't have to mess around with switching in and out of
terminal insert mode just to scroll through text.
Also 0-9 are mapped in a similar fashion, this was a selfish configuration
primarily driven to make using rusty-man documentation selection easier for
me to use.
q is mapped to close the terminal window.
Also, a doc window is opened once per tab.
(Sorry for the poor documentation!)