File tree Expand file tree Collapse file tree 4 files changed +38
-4
lines changed
Expand file tree Collapse file tree 4 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 11" File: jsdoc.vim
22" Author: NAKAMURA, Hisashi <https://github.com/sunvisor>
33" Modifyed: Shinya Ohyanagi <[email protected] >4- " Version: 0.10.1
4+ " Version: 0.11.0
55" WebPage: http://github.com/heavenshell/vim-jsdoc/
66" Description: Generate JSDoc to your JavaScript file.
77" License: BSD, see LICENSE for more details.
@@ -29,6 +29,10 @@ let g:jsdoc_type_hook = exists('g:jsdoc_type_hook')
2929 \ ? g: jsdoc_type_hook
3030 \ : {}
3131
32+ let g: jsdoc_user_defined_tags = exists (' g:jsdoc_user_defined_tags' )
33+ \ ? g: jsdoc_user_defined_tags
34+ \ : {}
35+
3236" Default tag names
3337" @returns (synonyms: @return)
3438" @function (synonyms: @func, @method)
@@ -402,6 +406,11 @@ function! jsdoc#insert() abort
402406 call add (l: lines , l: space . ' * @static' )
403407 endif
404408
409+ " Add user defined tags.
410+ for t in keys (g: jsdoc_user_defined_tags )
411+ call add (l: lines , l: space . ' * ' . t . ' ' . g: jsdoc_user_defined_tags [t ])
412+ endfor
413+
405414 let l: hook = keys (g: jsdoc_custom_args_hook )
406415 for l: arg in l: args
407416 let s: candidate_type = ' '
Original file line number Diff line number Diff line change 11*jsdoc.txt* Generate JSDoc to your JavaScript code.
22
3- Version: 0.10.1
3+ Version: 0.11.0
44Author: NAKAMURA, Hisashi <https://github.com/sunvisor >
55Modifyed: Shinya Ohynagi <
[email protected] >
66Repository: http://github.com/heavenshell/vim-jsdoc/
@@ -277,8 +277,33 @@ g:jsdoc_tags *g:jsdoc_tags*
277277>
278278 Can be changed on a per tag basis, for example: let g:jsdoc_tags = {} | let g:jsdoc_tags['param'] = 'arg'
279279
280+ g:jsdoc_user_defined_tags *g:jsdoc_user_defined_tags*
281+ Allow use of insert custom tags.
282+ Default value is '{}'
283+
284+ If you set following setting to .vimrc or _vimrc.
285+ >
286+ let g:jsdoc_user_defined_tags = {
287+ \ '@author': 'Foo',
288+ \ '@date': strftime('%Y-%m-%d'),
289+ \}
290+ >
291+ /**
292+ * foo
293+ *
294+ * @author Foo
295+ * @date 2016-09-11
296+ * @param {} arg1
297+ * @param {} arg2
298+ */
299+ function foo(arg1, arg2) {
300+ }
301+ >
280302==============================================================================
281303CHANGELOG *jsdoc-changelog*
304+ 2016-09-11
305+ - Add g:jsdoc_user_defined_tags option for insert custom tags.
306+
2823072016-09-11
283308- Fix private, public bug.
284309
Original file line number Diff line number Diff line change 11" File: jsdoc.vim
22" Author: NAKAMURA, Hisashi <https://github.com/sunvisor>
33" Modifyed: Shinya Ohyanagi <[email protected] >4- " Version: 0.10.1
4+ " Version: 0.11.0
55" WebPage: http://github.com/heavenshell/vim-jsdoc/
66" Description: Generate JSDoc to your JavaScript file.
77" License: BSD, see LICENSE for more details.
Original file line number Diff line number Diff line change 11" File: jsdoc.vim
22" Author: NAKAMURA, Hisashi <https://github.com/sunvisor>
33" Modifyed: Shinya Ohyanagi <[email protected] >4- " Version: 0.10.1
4+ " Version: 0.11.0
55" WebPage: http://github.com/heavenshell/vim-jsdoc/
66" Description: Generate JSDoc to your JavaScript file.
77" License: BSD, see LICENSE for more details.
You can’t perform that action at this time.
0 commit comments