Giter Club home page Giter Club logo

vim-readme-viewer's Introduction

vim-readme-viewer

Please read help for details.

📖 Viewing plugin's README easily like vim help

screenshot

Created by gh-md-toc

About

vim-readme-viewer help you to view some installed plugins' README(.md) file easily like vim help file. Viewing vim help file is very easy. Only :help {topic}! This plugin usage is also easy. If you are using dein.vim, please try:

:DeinReadme dein.vim
:DeinReadme vim-readme-viewer
" ... and other plugins

If you are using other plugin managers, please try:

:DppReadme vim-readme-viewer
:PlugReadme vim-readme-viewer  " for vim-plug
:PackReadme vim-readme-viewer  " for minpac
:PackerReadme vim-readme-viewer  " for packer.nvim
:JetpackReadme vim-readme-viewer  " for vim-jetpack
" ... and other plugins

Why use this?

Vim help file is very useful and viewing it is very easy. However, some plugins, which is special such as colorschemes or tiny plugins, sometimes don't have vim help file. So, when you want to custom those plugins, you have to read README.md or look at plugins' inside code. It is not good for you because you have to do it outside vim.

Features

Installation

with vim script:

let g:readme_viewer#plugin_manager = 'dein.vim'
call dein#add('4513ECHO/vim-readme-viewer', {'on_cmd': 'DeinReadme'})

with toml:

[[plugins]]
repo = '4513ECHO/vim-readme-viewer'
on_cmd = ['DeinReadme']
hook_add = '''
let g:readme_viewer#plugin_manager = 'dein.vim'
'''

Depends on your liking configuration.

let g:readme_viewer#plugin_manager = 'vim-plug'
Plug '4513ECHO/vim-readme-viewer', { 'on': 'PlugReadme' }
let g:readme_viewer#plugin_manager = 'minpac'
call minpac#add('4513ECHO/vim-readme-viewer')
use {
  '4513ECHO/vim-readme-viewer',
  opt = true,
  cmd = 'PackerReadme',
  config = function()
    vim.g['readme_viewer#plugin_manager'] = 'packer.nvim'
  end
}
let g:readme_viewer#plugin_manager = 'vim-jetpack'
Jetpack '4513ECHO/vim-readme-viewer', { 'on': 'JetpackReadme' }

Tips

General

Basically vim-readme-viewer automatically judge your using plugin manager. However, it sometimes may fail. I recommend that you set manually g:readme_viewer#plugin_manager to plugin manager.

let g:readme_viewer#plugin_manager = 'vim-plug'  " for vim-plug
let g:readme_viewer#plugin_manager = 'minpac'  " for minpac

vim-plug

On default, vim-plug is not register itself as a plugin. So, vim-readme-viewer cannot open vim-plug's README.md. If you want to view vim-plug's README.md, you register vim-plug as a plugin.

Plug 'junegunn/vim-plug'

packer.nvim

  • :PackerReadme require that executing :PackerCompile. If you don't execute it, vim-readme-viewer throws error.
  • plugin's path data is sometimes empty. See also wbthomason/packer.vim#765.

ddu.vim

Usage examples:

" Set kind default action
call ddu#custom#pathch_global({
      \ 'kindOptions': {
      \   'readme_viewer': {
      \     'defaultAction': 'open',
      \ }}})
" Use readme_viewer source.
call ddu#start({'sources': [{'name': 'readme_viewer'}]})

TODO

  • Improve README.md and doc/readme_viewer.txt
    • add new functions to doc/readme_viewer.txt
  • Support other plugin managers

Introduced Articles

If you wrote an article about the plugin, please send me Pull-Request 😃

License

MIT License

vim-readme-viewer's People

Contributors

4513echo avatar shougo avatar tani avatar yasunori0418 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vim-readme-viewer's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.