All Projects → rhysd → Devdocs.vim

rhysd / Devdocs.vim

Open devdocs.io from Vim

Projects that are alternatives of or similar to Devdocs.vim

Vim Plugin Viewdoc
Vim plugin: flexible viewer for any documentation
Stars: ✭ 79 (-42.34%)
Mutual labels:  documentation, vim-plugin
Zeavim.vim
Zeal for Vim
Stars: ✭ 320 (+133.58%)
Mutual labels:  documentation, vim-plugin
Drstring
DrString finds issues in your Swift docstrings and fixes them for you.
Stars: ✭ 133 (-2.92%)
Mutual labels:  documentation
Kirby Secrets
Unofficial documentation for Kirby CMS. It's is NOT maintained by the Kirby crew.
Stars: ✭ 136 (-0.73%)
Mutual labels:  documentation
Syntastic
Syntax checking hacks for vim
Stars: ✭ 11,044 (+7961.31%)
Mutual labels:  vim-plugin
Rx Book
xgrommx.github.io/rx-book
Stars: ✭ 1,660 (+1111.68%)
Mutual labels:  documentation
Uswds Site
USWDS website and documentation
Stars: ✭ 135 (-1.46%)
Mutual labels:  documentation
Docs
Documentation site
Stars: ✭ 128 (-6.57%)
Mutual labels:  documentation
Scuttlebutt Protocol Guide
Protocol documentation for Secure Scuttlebutt
Stars: ✭ 137 (+0%)
Mutual labels:  documentation
Ale
Check syntax in Vim asynchronously and fix files, with Language Server Protocol (LSP) support
Stars: ✭ 11,380 (+8206.57%)
Mutual labels:  vim-plugin
App Talk
Let iOS apps talk - A user contributable directory of iOS apps with x-callback-urls.
Stars: ✭ 136 (-0.73%)
Mutual labels:  documentation
Yard
YARD is a Ruby Documentation tool. The Y stands for "Yay!"
Stars: ✭ 1,735 (+1166.42%)
Mutual labels:  documentation
Diffchar.vim
Highlight the exact differences, based on characters and words
Stars: ✭ 132 (-3.65%)
Mutual labels:  vim-plugin
Xs Fun
XS is fun: a simple and easy tutorial on writing Perl XS
Stars: ✭ 135 (-1.46%)
Mutual labels:  documentation
Python Docs Es
Spanish translation of the Python documentation.
Stars: ✭ 131 (-4.38%)
Mutual labels:  documentation
Widoco
Wizard for documenting ontologies. WIDOCO is a step by step generator of HTML templates with the documentation of your ontology. It uses the LODE environment to create part of the template.
Stars: ✭ 136 (-0.73%)
Mutual labels:  documentation
Vsphere Automation Sdk Java
Java samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
Stars: ✭ 132 (-3.65%)
Mutual labels:  documentation
Ziglearn
Repo for https://ziglearn.org content. Get up to speed with Zig quickly.
Stars: ✭ 135 (-1.46%)
Mutual labels:  documentation
Editor.md
The open source embeddable online markdown editor (component).
Stars: ✭ 11,741 (+8470.07%)
Mutual labels:  documentation
Github Template Guidelines
Guidelines for building GitHub templates.
Stars: ✭ 137 (+0%)
Mutual labels:  documentation

devdocs.vim

Build Status

This is a Vim plugin for devdocs, which is an awesome multiple API documentation service. You can open and search devdocs from Vim.

  • Open and search devdocs using command :DevDocs or :DevDocsAll
  • Relate filetype to specific documentation.
  • Search word under the cursor.

Usage

  • :DevDocs [query] : Search with query with filetype related documentation (query can be omitted)
  • :DevDocsAll [query] : Search with query with all documentation (query can be omitted)

Customize

Mapping K to search under the word quickly

devdocs.vim doesn't overrides any mapping by default. You should define key mappings if you need.

If you always want to override K mapping,

nmap K <Plug>(devdocs-under-cursor)

If you want to override K mapping in specific filetypes,

augroup plugin-devdocs
  autocmd!
  autocmd FileType c,cpp,rust,haskell,python nmap <buffer>K <Plug>(devdocs-under-cursor)
augroup END

Above replaces K in C, C++, Rust, Haskell, and Python.

Open with specific documentation on specific filetype

You can customize relationship between Vim's filetype and documentation. Below is an example of customization.

let g:devdocs_filetype_map = {
    \   'ruby': 'rails',
    \   'javascript.jsx': 'react',
    \   'javascript.test': 'chai',
    \ }

With above configuration, :DevDocs blah searches Rails documentation on filetype ruby.

:DevDocsAll searches all documentation ignoring filetype relation and below configuration explicitly disables this feature.

let g:devdocs_filetype_map = { '*': '' }

Open local devdocs

You can easily host local devdocs. If your local devdocs is hosted at localhost:9292, devdocs.vim uses it by following configuration.

let g:devdocs_host = 'localhost:9292'

If you use http:// to host your DevDocs instance, please use g:devdocs_url variable to specify an http:// scheme.

let g:devdocs_url = 'http://localhost:9292'

Make a command for specific document

You can use devdocs#open_doc() function to make such a command.

Below is an example for :DevDocsReact command to open page with 'react' documentation

command! -nargs=* DevDocsReact call devdocs#open_doc(<q-args>, 'react')

You can execute as below,

:DevDocsReact
:DevDocsReact componentDidMount

Open in non-default browser

devdocs.vim opens URL with open-browser.vim at first. If it is not installed, it tries to open default browser. If you don't install open-browser.vim and want to use non-default browser, please use g:devdocs_open_cmd to specify what command should be used for opening a browser.

" Open devdocs.io in Safari on macOS
let g:devdocs_open_cmd = 'open -a Safari'

" Open devdocs.io in Firefox on Linux
let g:devdocs_open_cmd = 'firefox'

License

Copyright (c) 2015 rhysd

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].