/perldoc-float-vim

Perldoc plugin for vim, in Floaterm

Primary LanguageVim ScriptGNU General Public License v3.0GPL-3.0

perldoc + Floaterm

Example

This package is focked from perldoc-vim, and features float terminal which allows you to perldoc as if in console.

Installation

Install Floaterm and ensure it works properly, in addition to your perldoc binary. You can test them briefly by

:FloatermNew

and

perldoc -f say

Then, install this package by package managers you are using. For example, in vim-plug, add

Plug 'dzangfan/perldoc-float-vim'

to your plug-section and execute :PlugInstall.

Usage

The basic (and only) command is Perldoc, which accepts a builtin function name(e.g. say), package path(e.g. List::Util) or special variable(e.g. $/) and displays corresponding documents if exists. If no argument is provided, Perldoc will pick the word your cursor is pointing up. By default, we do not provide any keymap. So if you want the effect in our demo, add

nnoremap <silent> * :Perldoc<CR>

to your configuration(i.e. .vimrc, init.vim, etc.).