Nothing Special   »   [go: up one dir, main page]

Skip to content
/ vim-hp Public

This plugin should help you write documentation for your plugins.

License

Notifications You must be signed in to change notification settings

dokwork/vim-hp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vim-hp

Vader Tests

"Helps to write a help"

This plugin is created to help you write documentation for your plugins. The main feature is generating a contents of a vim's help file.

It brings two commands:

:HpGenerateContents

...to generate the contents of the document at the cursor;

and

:HpRefresh

... to regenerate already existed contents and update numbers of sections in the document.

example

Both commands available only for buffers with filetype help.

Read more in the doc: vim-hp.txt.

How to install

Plug 'dokwork/vim-hp'
use { 'dokwork/vim-hp' }

Example

Let's see an example. We wrote our documentation with two sections: Usage and License.

  1 ▉
  2 ==============================
  3  1. Usage *usage*
  4    Some text...
  5 
  6  2. License	*license*
  7    Some text...

Now, we want to build the Contents of our documentation. To do so, we should put the cursor to the place where the contents should be (position 1:1 in the example above) and run command :HpGenerateContents. It inserts the contents and move tags in the titles of sections to the right side:

  1 CONTENTS
  2   1. Usage.............|usage|
  3   2. License.........|license|
  4 ==============================
  5  1. Usage	 	   *usage*
  6    Some text...
  7 
  8  2. License	         *license*
  9    Some text...

Then we decided to add one more section in the middle, let's it be a section Commands. We can set number 2 for the new section, or let the plugin choose a number:

  1 CONTENTS
  2   1. Usage.............|usage|
  3   2. License.........|license|
  4 ==============================
  5  1. Usage	  	   *usage*
  6    Some text...
  7 
  8  #. Commands *commands*
  9    Some text...
 10 
 11  2. License	         *license*
 12    Some text...

The command :HpRefresh will update both the contents and titles:

  1 CONTENTS
  2   1. Usage.............|usage|
  3   2. Commands.......|commands|
  4   3. License.........|license|
  5 ==============================
  6  1. Usage	 	   *usage*
  7    Some text...
  8 
  9  2. Commands        *commands*
 10    Some text...
 11 
 12  3. License	         *license*
 13    Some text...

About

This plugin should help you write documentation for your plugins.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published