<commit_before>*pydocstring.txt*	Generate Python docstring to your Python code.

Version: 0.0.9
Author: <NAME> <<EMAIL>>
Repository: http://github.com/heavenshell/vim-pydocstring/
License: BSD, see LICENSE for more details.

==============================================================================
CONTENTS					*pydocstring-vim-contents*

Introduction		|pydocstring-introduction|
Install			|pydocstring-install|
Tutorial		|pydocstring-tutorial|
Template		|pydocstring-template|
Variables		|pydocstring-variables|
Example			||pydocstring-example|

==============================================================================
INTRODUCTION					*pydocstring-vim-introduction*

|Pydocstring| is a generater of Python docstring.

 * Insert one-line docstring.
 * Insert multi-line docstring.
 * Insert comment.

This plugin is heavily inspired by phpdoc.vim and sonictemplate.vim.
- phpdoc.vim
  http://www.vim.org/scripts/script.php?script_id=1355
- sonictemplate.vim
  https://github.com/mattn/sonictemplate-vim

==============================================================================
INSTALL						*pydocstring-vim-install*

Install the distributed files into Vim runtime directory which is usually
~/.vim/, or $HOME/vimfiles on Windows.

If you install pathogen that provided from Tim Pope, you should extract the
file into 'bundle' directory.

==============================================================================
TUTORIAL					*pydocstring-vim-tutorial*

1. def keyword.
  Define function to your code.
>
  def foo(arg1, arg2):
    pass
<
  Set cursor on `def` line and type following.
>
  :Pydocstring
<
  Then docstring put under `def` line.
>
  def foo(arg1, arg2):
    """foo

    :param arg1:
    :param arg2:
    """
    pass
<

2. class keyword.
  Define class to your code.
>
  class Foo(object):
    def foo(self):
      pass

    def arg1(self, arg1):
      pass
<
  Set cursor on `class` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `class` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      pass

    def arg1(self, arg1):
      pass
<
  Set cursor on `def foo` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `def foo` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      """foo"""
      pass
    def arg1(self, arg1):
      pass
<
  Set cursor on `def arg1` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `def arg1` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      """foo"""
      pass
    def arg1(self, arg1):
      """arg1

      :param arg1:
      pass
<

==============================================================================
TEMPLATE					*pydocstring-vim-template*

If you don't like default docstring, You can modify docstring template.
>
  let g:pydocstring_templates_dir = '/path/to/your/template/directory'
<
- comment.txt
  Comment.
- oneline.txt
  One-line docstring.
- multi.txt
  Multi-line docstring.

Template variables.
  |{{_header_}}|	Class, function or method name as a value.
  |{{_args_}}|	Assign function or method's arguments.
  |{{_lf_}}|	Assign line break.
  |{{_indent_}}|	Assign indent.
  |{{_nested_indent_}}|	Assign indent.

==============================================================================
VARIABLES					*pydocstring-vim-variables*

g:pydocstring_templates_dir			*g:pydocstring_templates_dir*
		Path to your own template file.

		Refer template/pydocstring/ about the default value.

g:pydocstring_ignore_args_pattern		*g:pydocstring_ignore_args_pattern*
		Usually Python's method need self keyword at first argument.
		But in docstring, you don't need to write it.
		This option set ignore regex pattern.

		Default value is 'self\|cls'

g:pydocstring_enable_comment			*g:pydocstring_enable_comment*
		If you execute :Pydocstring at no `def`, `class` line.
		g:pydocstring_enable_comment enable to put comment.txt value.
<commit_msg>Align the doc with new implementation<commit_after>*pydocstring.txt*	Generate Python docstring to your Python code.

Version: 0.0.9
Author: <NAME> <<EMAIL>>
Repository: http://github.com/heavenshell/vim-pydocstring/
License: BSD, see LICENSE for more details.

==============================================================================
CONTENTS					*pydocstring-vim-contents*

Introduction		|pydocstring-introduction|
Install			|pydocstring-install|
Tutorial		|pydocstring-tutorial|
Template		|pydocstring-template|
Variables		|pydocstring-variables|
Example			||pydocstring-example|

==============================================================================
INTRODUCTION					*pydocstring-vim-introduction*

|Pydocstring| is a generater of Python docstring.

 * Insert one-line docstring.
 * Insert multi-line docstring.
 * Insert comment.

This plugin is heavily inspired by phpdoc.vim and sonictemplate.vim.
- phpdoc.vim
  http://www.vim.org/scripts/script.php?script_id=1355
- sonictemplate.vim
  https://github.com/mattn/sonictemplate-vim

==============================================================================
INSTALL						*pydocstring-vim-install*

Install the distributed files into Vim runtime directory which is usually
~/.vim/, or $HOME/vimfiles on Windows.

If you install pathogen that provided from Tim Pope, you should extract the
file into 'bundle' directory.

==============================================================================
TUTORIAL					*pydocstring-vim-tutorial*

1. def keyword.
  Define function to your code.
>
  def foo(arg1, arg2):
    pass
<
  Set cursor on `def` line and type following.
>
  :Pydocstring
<
  Then docstring put under `def` line.
>
  def foo(arg1, arg2):
    """foo

    :param arg1:
    :param arg2:
    """
    pass
<

2. class keyword.
  Define class to your code.
>
  class Foo(object):
    def foo(self):
      pass

    def arg1(self, arg1):
      pass
<
  Set cursor on `class` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `class` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      pass

    def arg1(self, arg1):
      pass
<
  Set cursor on `def foo` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `def foo` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      """foo"""
      pass
    def arg1(self, arg1):
      pass
<
  Set cursor on `def arg1` line and type following.
>
  :Pydocstring
<
  Then one-line docstring put under `def arg1` line.
>
  class Foo(object):
    """Foo"""
    def foo(self):
      """foo"""
      pass
    def arg1(self, arg1):
      """arg1

      :param arg1:
      pass
<

==============================================================================
TEMPLATE					*pydocstring-vim-template*

If you don't like default docstring, You can modify docstring template.
>
  let g:pydocstring_templates_dir = '/path/to/your/template/directory'
<
- comment.txt
  Comment.
- oneline.txt
  One-line docstring.
- multi.txt
  Multi-line docstring.

Template variables.
  |{{_header_}}|	Class, function or method name as a value.
  |{{_args_}}|		Assign function or method's arguments.
  |{{_lf_}}|		Assign line break.
  |{{_indent_}}|	Assign indent.
  |{{_nested_indent_}}|	Assign indent.
  |{{_returnType_}}|	Function or method return type.

There's some rules for parsing template:
- `{{_header_}`, `{{_args}}` and `{{_returnType_}}` should be on their own
  line.
- Pydocstring will insert a emmpty line between each parts, so you don't
  need to include empty line in your template. Please see the default template
  directory to have an example.
==============================================================================
VARIABLES					*pydocstring-vim-variables*

g:pydocstring_templates_dir			*g:pydocstring_templates_dir*
		Path to your own template file.

		Refer template/pydocstring/ about the default value.

g:pydocstring_ignore_args_pattern		*g:pydocstring_ignore_args_pattern*
		Usually Python's method need self keyword at first argument.
		But in docstring, you don't need to write it.
		This option set ignore regex pattern.

		Default value is 'self\|cls'

g:pydocstring_enable_comment			*g:pydocstring_enable_comment*
		If you execute :Pydocstring at no `def`, `class` line.
		g:pydocstring_enable_comment enable to put comment.txt value.

{'fraction_non_alphanumeric': 0.2047281891275651, 'fraction_numerical': 0.006480259210368415, 'mean_word_length': 4.014440433212997, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6157767', 'n_tokens_mistral': 2717, 'n_tokens_neox': 2484, 'n_words': 771}