• Stars
    star
    441
  • Rank 98,861 (Top 2 %)
  • Language
    Vim Script
  • License
    BSD 3-Clause "New...
  • Created almost 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate JSDoc to your JavaScript code.

jsdoc.vim

build

jsdoc.vim generates JSDoc block comments based on a function signature.

jsdoc.vim

Note

jsdoc.vim supports Vim8.

Neovim works since v2.1.0, but if something wrong, send me pull requests to fix it.

If you want use old version checkout 1.0.0.

Requirements

Node v12.x or above.

Install

Vim Plug

Plug 'heavenshell/vim-jsdoc', {
  \ 'for': ['javascript', 'javascript.jsx','typescript'],
  \ 'do': 'make install'
\}
PlugUpdate error

If you got `yarn.lock` related error,

error: Your local changes to the following files would be overwritten by merge:
    lib/yarn.lock

Run following command

cd /path/to/plugged/vim-jsdoc
git checkout -- yarn.lock

and re-run PlugUpdate

Manual Installation

Since version 2.0.0, jsdoc.vim requires a local copy lehre installed to the plugin directory.

You can install lehre with:

# cd to <vim-jsdoc path>
make install

If you want to update lehre use:

make clean
make install

If you want to install lehre manually, you can install from npm.

$ yarn add -D lehre

Set installed /path/to/node_modules/.bin/lehre path to g:jsdoc_lehre_path.

Installing on Windows

# cd to <vim-jsdoc path>/lib
npm install

If you want to set the path of lehre manually on Windows, you should use the path with the file extension .cmd, such as /path/to/node_modules/.bin/lehre.cmd.

Usage

  1. Move cursor on function keyword line
  2. Type :JsDoc to insert JSDoc
  3. Insert JSDoc above the function keyword line

Format

  1. Type :JsDocFormat
  2. Insert JSDoc above the all signatures

Configuration

Option Default Description
g:jsdoc_templates_path '' Path to custom template.
g:jsdoc_formatter 'jsdoc' Document block formatter, jsdoc, esdoc, tsdoc
g:jsdoc_lehre_path './lib/lehre' Path to lehre.

Formatter

You can choose formatter from JsDoc, ESDoc, TSDoc.

If you want to create your own template, see example template.

Interactive input

Since ver 2.0.0 input Allow prompt for interactive input is deprecated.

If you want input Interactively, use snippet plugin.

See snippet example template.

Keymap

You can add following setting to .vimrc

nmap <silent> <C-l> <Plug>(jsdoc)

Alternatively, you could add the following setting to your .vimrc to search for the last function declaration and puts your jsdoc above it:

nmap <silent> <C-l> ?function<cr>:noh<cr><Plug>(jsdoc)

Thanks

LICENSE

New BSD LICENSE

More Repositories

1

vim-pydocstring

Generate Python docstring to your Python source code.
Vim Script
332
star
2

vim-slack

Slack for Vim client
Vim Script
106
star
3

py-doq

Docstring generator
Python
44
star
4

vim-textlint

Wrapper for textlint
Vim Script
26
star
5

py-sqlalchemy_seed

Simple data seeder using SQLAlchemy.
Python
25
star
6

vim-genshijin

Genshinize your Japanese text
Vim Script
20
star
7

vim-quickrun-hook-unittest

Quickrun hook for enable to unittest by selecting method.
Vim Script
19
star
8

vim-ojosama

Vim Script
18
star
9

vim-prettier

Prettier-Eslint-Cli for Vim
Vim Script
18
star
10

vim-pokemon

Pokemon might be in your open file....
Vim Script
17
star
11

ts-lehre

Generate document block(JsDoc, EsDoc, TsDoc) from source code
TypeScript
14
star
12

py-qiita

Python wrapper for Qiita API v1.
Python
10
star
13

py-doco

Client library for docomo API written in Python.
Python
10
star
14

vim-flood

A simple Vim plugin for facebook flow
Vim Script
10
star
15

py-mackerel-client

Mackerel client implemented by Python.
Python
8
star
16

unite-sf2

A unite.vim plugin for Symfony2
Vim Script
8
star
17

php-net-kyototycoon

Client library KyotoTycoon for PHP
PHP
8
star
18

py-autodoc

Autodoc Python implementation.
Python
7
star
19

vim-tslint

Vim plugin for tslint
Vim Script
7
star
20

vim-jikoku

Convert given timestamp to local date time and utc
Vim Script
7
star
21

vim-misspell

misspell for Vim.
Vim Script
7
star
22

py-pixela

Pixela API client for Python.
Python
5
star
23

py-robo

Dead simple bot framework
Python
4
star
24

vim-shutup

Supress warnings
Vim Script
4
star
25

unite-zf

A unite.vim plugin for Zend Framework
Vim Script
4
star
26

php-silex-maintenance

Show maintenance to client.
PHP
4
star
27

php-string-filter

Porting p5-string-filter to PHP
PHP
4
star
28

py-pyltsv

Dead simple LTSV parser written in Python C extension
Python
3
star
29

php-net-url-dispatcher

PHP library for Dispatch to controller class from PATH_INFO
PHP
3
star
30

ts-react-static

My React-Static site
TypeScript
3
star
31

ts-react-redux-hooks

PoC of Typescript + [email protected] + React Hooks + react-router
TypeScript
3
star
32

unite-flask

A unite.vim plugin for Flask
Vim Script
3
star
33

vim-syntax-flowtype

Vim Script
3
star
34

cliff-samples

Cliff sample application
Python
3
star
35

gene

Glue of Zend Framework
PHP
3
star
36

vim-snowflake

An asynchronous Python source code checker for Vim.
Vim Script
3
star
37

zf-resources-lang-ja

Japanese translation of Zend Framework language resources
PHP
2
star
38

php-silex-kyototycoon

Silex Net_KyotoTycoon extension
PHP
2
star
39

vim-eslint

An asynchronous Eslint(@typescript-eslint) for Vim.
Vim Script
2
star
40

php-net-okuyama

PHP client library for Okuyama(Distributed key-value-store).
PHP
2
star
41

vim-recents

PoC of vim-prompter
Vim Script
2
star
42

vim-kotoha

vim-kotoha is useful Vim plugin that help you to quote a good phrase!
Vim Script
2
star
43

vim-flocke

Vim Script
2
star
44

php-silex-zf-validate

Silex Zend Validate extension
PHP
2
star
45

php-silex-zf-db

Silex Zend_Db extension
PHP
2
star
46

py-jokk

RESTful mock api server.
Python
2
star
47

vim-quickrun-hook-sphinx

Quickrun hook for Sphinx build
Vim Script
2
star
48

php-wozozo-zenra

PHP library of zenrize Japanese sentence.
PHP
2
star
49

vim-tslint-config

Wrapper for TSLint
Vim Script
2
star
50

py-gene-script

My Flask project generator.
JavaScript
1
star
51

fission

Python paver script stuffs
Python
1
star
52

vim-tsukasa

My extend Tsuquyomi plugin
Vim Script
1
star
53

heavenshell.github.com

My github pages
1
star
54

vim-connpass

Search interface for Connpass
Vim Script
1
star
55

vim-sudden-death

Sudden-death
Vim Script
1
star
56

go-pluginbaby

My Vim plugin updater
Go
1
star
57

rstblog-contrib-youtube

rstblog youtube module
Python
1
star
58

vim-gene-theme

My Vim colorscheme
Vim Script
1
star
59

vim-frontier

My frontend(JavaScript) Vim plugin packs.
Vim Script
1
star
60

sunzi-sudo

Wrapper for Sunzi using Python Fabric
1
star
61

vim-unitquickrun

Simple QuickRun.vim wrapper for rewrite g:quickrun_config dynamically.
Vim Script
1
star
62

tddbc-osaka

TDD Bootcamp Osaka2.0 Python repository
Python
1
star
63

vim-markuplint

Vim Script
1
star
64

p5-Net-Okuyama

Perl5 client library for Okuyama(Distributed key-value-store).
Perl
1
star
65

vim-mouko

Vim Script
1
star
66

gene-docs

Docs for Gene
1
star
67

vim-eslint-config

Wrapper for ESLint [deprecated]
Vim Script
1
star