Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
Version 0.1.5
-------------
Released on Nov 18th 2017

- Fix bug

- Invalid space after {{_header_}}
- Document's custom template section was wrong

see https://github.com/heavenshell/vim-pydocstring/issues/34

Thx @themightyoarfish

Version 0.1.4
-------------
Released on Sep 10th 2017
Expand Down
3 changes: 1 addition & 2 deletions autoload/pydocstring.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" Insert Docstring.
" Author: Shinya Ohyanagi <[email protected]>
" Version: 0.1.4
" Version: 0.1.5
" WebPage: http://github.com/heavenshell/vim-pydocstriong/
" Description: Generate Python docstring to your Python script file.
" License: BSD, see LICENSE for more details.
Expand Down Expand Up @@ -157,7 +157,6 @@ function! s:builddocstring(strs, indent, nested_indent)
if line =~ '{{_header_}}'
let header = substitute(line, '{{_header_}}', prefix, '')
call add(docstrings, a:indent . header)
call add(docstrings, '')
elseif line =~ '{{_args_}}'
if len(args) != 0
for arg in args
Expand Down
6 changes: 3 additions & 3 deletions doc/pydocstring.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*pydocstring.txt* Generate Python docstring to your Python code.

Version: 0.1.4
Version: 0.1.5
Author: Shinya Ohynagi <[email protected]>
Repository: http://github.com/heavenshell/vim-pydocstring/
License: BSD, see LICENSE for more details.
Expand Down Expand Up @@ -191,7 +191,7 @@ Numpy style docstring template example.
>
"""{{_header_}}

{{_arg_}} :{{_lf_}}{{_indent_}} {{_arg_}} is
{{_args_}} :{{_lf_}}{{_indent_}} {{_args_}} is
"""
<
Set cursor on `def arg1` line and type following.
Expand All @@ -217,7 +217,7 @@ Nested indent example.
"""{{_header_}}

{{_indent_}}Args:
{{_nested_indent_}}{{_arg_}}:
{{_nested_indent_}}{{_args_}}:
"""
<
Set cursor on `def arg1` line and type following.
Expand Down
2 changes: 1 addition & 1 deletion ftplugin/python/pydocstring.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" File: pydocstring.vim
" Author: Shinya Ohyanagi <[email protected]>
" Version: 0.1.4
" Version: 0.1.5
" WebPage: http://github.com/heavenshell/vim-pydocstriong/
" Description: Generate Python docstring to your Python script file.
" License: BSD, see LICENSE for more details.
Expand Down
1 change: 1 addition & 0 deletions template/pydocstring/multi.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""{{_header_}}

:param {{_args_}}:
:rtype: {{_returnType_}}
"""
1 change: 1 addition & 0 deletions test/templates/custom-templates/multi.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""{{_header_}}

{{_args_}}:{{_lf_}}{{_indent_}} the ...
return ({{_returnType_}}):
"""
1 change: 1 addition & 0 deletions test/templates/issue19/multi.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'''
{{_header_}}

{{_indent_}}Args:
{{_nested_indent_}}{{_args_}}:
'''
1 change: 1 addition & 0 deletions test/templates/numpy/multi.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""{{_header_}}

{{_indent_}}Parameters
{{_indent_}}----------

Expand Down