/jsdoc.vim

Generate JSDoc block comments in vim.

Primary LanguageVim ScriptOtherNOASSERTION

JSDoc Vim

Generate JSDoc block comments in vim.

Demo

jsdoc vim gif

Install

Vundle

Vundle is the recommended installation method

Add to your plugin list:

Plugin 'joegesualdo/jsdoc.vim'

Once added you your plugin list, you must install the plugin.

Launch vim and run:

:BundleInstall

Or install from command line:

$ vim +PluginInstall +qall

Usage

You can execute the JSDocAdd() function directly within a buffer. But it's recommended you add a mapping.

How to call function directly.

Call the function while cursor is on first line of a function definition:

:call JSDocAdd()

How to call from mapping

Define the mapping in your .vimrc.

nnoremap jsd :<C-u>call JSDocAdd()<CR>

Now while cursor is on first line of a function definition, you can call the mapping.