Skip to content

4513ECHO/vim-readme-viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •