devdocsbuf
所属分类:编程语言基础
开发工具:Vim Script
文件大小:0KB
下载次数:0
上传日期:2016-02-25 20:09:26
上 传 者:
sh-1993
说明: 缓冲器中的devdocs
(devdocs in a buffer)
文件列表:
LICENSE (1064, 2016-02-25)
devdocsbuf.png (414101, 2016-02-25)
plugin/ (0, 2016-02-25)
plugin/devdocsbuf.vim (1910, 2016-02-25)
# devdocsbuf
devdocsbuf is a small plugin bridging the gap between [devdocs](https://github.com/Thibaut/devdocs) and vim. The plugin automates looking up devdocs, converting the result to markdown and opening the result in a new buffer in vim.
## Requirements
The plugin relies on devdocs beeing set up locally and the html2text converting tool.
* [devdocs](https://github.com/Thibaut/devdocs) -
Install locally and download the wanted docs. Follow the excellent guide on the github page.
* [html2text](https://github.com/aaronsw/html2text) -
Install with pip `pip install [-g] html2text`, and make sure it is executable from your $PATH.
## How does it work
When called the plugin searches the index.json file for the given filetype, for a keyword matching the the word under the cursor. If a match i found, the html file is converted to markdown using html2text and opened in a new buffer.
If a exact match is not found, one that contains the word under the cursor is shown (see "Whats missing".
### Settings
`let g:devdocsbuf_devdocs_path = "/path/to/devdocs/public/docs/"`
## Useful mappings
Find docs for the current word, when pressing "K".
`nmap K :Devdocsbuf
`
## Why?
I love the devdocs resources, but i hate leaving vim. So i thought, why not combine the two and make it even easier to view the docs, while writing some code.
## Whats missing
There are a number of things that i would like to add.
* Extend functionality when no exact match is found
* Manage installed devdocs from plugin
* Allow for filetype mapping
## License
MIT License, see LICENSE.
近期下载者:
相关文件:
收藏者: