sponsor Vim development Vim logo Vim Book Ad

helplink.vim : Link to Vim help pages with ease.

 script karma  Rating 14/5, Downloaded by 723  Comments, bugs, improvements  Vim wiki

created by
Martin Tournoij
 
script type
utility
 
description
Homepage: http://code.arp242.net/helplink.vim

-----------------------------------------

Introduction
============
Link to Vim help pages with ease.

There are several sites which host the Vim help pages in formatted HTML. It's
often quite useful to link to this when explaining something.

With this plugin you can make a link to the help section you're viewing. Just
use `:Helplink`.

I originally wrote this here:
http://meta.vi.stackexchange.com/a/1250/51

Commands
========
:Helplink {format}                                                 `:Helplink`

Try to find the tag closest to the cursor (backwards search only) and
format it. If multiple tags are found on the same line, it asks the
user which one to pick.

This will echo the formatted URL and copy them to the registers in
`g:helplink_copy_to_registers`.

You can {format} parameter to get a different format; if not given the
value of `g:helplink_default_format` is used.

Options
=======
`g:helplink_copy_to_registers`                      (List, default: ['+', '\*'])

Automatically copy the link to these registers.

`g:helplink_url`                                 (URL, default:
http://vimhelp.appspot.com/%%FILE%%.html#%%TAGNAME_QUOTED%%)

Available placeholders:
- `{%%FILE%%}`          File name (e.g. `options.txt`)
- `%%TAGNAME%%`         Tag name (e.g. 'expandtab')
- `%%TAGNAME_QUOTED%%`  The quoted tag name for use in URLS (e.g. %27expandtab%27)

`g:helplink_formats`                                        (dict, default:

    {
    \ 'markdown':  "'[`:help ' . l:tagname . '`](' . l:url . ')'",
    \ 'html': "'<a href=\"' . l:url . '\">:help ' . l:tagname . '</a>'",
    \ 'bbcode': "'[url=' . l:url . '][code]:help ' . l:tagname . '[/code][/url]'"
    \}

This string is `eval`-ed, variables you can use are {l:tagname} and
{l:url}.

`g:helplink_default_format`                         (String, default: markdown)

Available formats:
- markdown
- html
- bbcode

You can add your own in `g:helplink_formats`.

Functions
=========
`helplink#link([{format}])`                                    `helplink#link()`

Implements the `:Helplink` command; the {format} is optional.
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
download-from-homepage.tar.gz 1.0 2016-10-31 7.0 Martin Tournoij Download from homepage
ip used for rating: 35.170.81.33

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github