File tree Expand file tree Collapse file tree 4 files changed +33
-6
lines changed Expand file tree Collapse file tree 4 files changed +33
-6
lines changed Original file line number Diff line number Diff line change 1+ Version 0.0.6
2+ -------------
3+ Released on January 17th 2016
4+
5+ - add ``pydocstring_enable_mapping `` option.
6+ Thx @nfischer
7+
18Version 0.0.5
29-------------
310Released on September 28th 2015
Original file line number Diff line number Diff line change 11" Insert Docstring.
22" Author: Shinya Ohyanagi <sohyanagi@gmail.com>
3- " Version: 0.0.5
3+ " Version: 0.0.6
44" License: This file is placed in the public domain.
55" WebPage: http://github.com/heavenshell/vim-pydocstriong/
66" Description: Generate Python docstring to your Python script file.
Original file line number Diff line number Diff line change 11*pydocstring.txt* Generate Python docstring to your Python code.
22
3- Version: 0.0.5
3+ Version: 0.0.6
44Author: Shinya Ohynagi <sohyanagi@gmail.com>
55Repository: http://github.com/heavenshell/vim-pydocstring/
66License: BSD, see LICENSE for more details.
@@ -161,6 +161,16 @@ g:pydocstring_enable_comment *g:pydocstring_enable_comment*
161161
162162 Default value is '1'
163163
164+ g:pydocstring_enable_mapping *g:pydocstring_enable_mapping*
165+ Disable this option to prevent pydocstring from creating any
166+ key mapping to the `:Pydocstring` command.
167+ Note: this value is overridden if you explicitly create a
168+ mapping in your vimrc, such as if you do:
169+
170+ nmap <silent> <C-m> <Plug> (pydocstring)
171+
172+ Default value is '1'
173+
164174==============================================================================
165175EXAMPLE *pydocstring-vim-example*
166176
@@ -196,6 +206,10 @@ Override default mapping.
196206
197207 nmap <silent> <C-m> <Plug> (pydocstring)
198208
209+ To disable mappings entirely, add the following to your .vimrc or _vimrc.
210+
211+ let g:pydocstring_enable_mapping = 0
212+
199213
200214==============================================================================
201215vim:tw=78:ts=8:ft=help:norl:noet:fen:fdl=0:
Original file line number Diff line number Diff line change 11" File: pydocstring.vim
22" Author: Shinya Ohyanagi <sohyanagi@gmail.com>
3- " Version: 0.0.5
3+ " Version: 0.0.6
44" WebPage: http://github.com/heavenshell/vim-pydocstriong/
55" Description: Generate Python docstring to your Python script file.
66" License: BSD, see LICENSE for more details.
@@ -10,9 +10,15 @@ set cpo&vim
1010
1111command ! -nargs =0 - buffer -complete =customlist ,pydocstring#insert Pydocstring call pydocstring#insert ()
1212
13- nnoremap <silent> <buffer> <Plug> (pydocstring) :call pydocstring#insert()<CR>
14- if ! hasmapto (' <Plug>(pydocstring)' )
15- nmap <silent> <C-l> <Plug> (pydocstring)
13+ if ! exists (' g:pydocstring_enable_mapping' )
14+ let g: pydocstring_enable_mapping = 1
15+ endif
16+
17+ if g: pydocstring_enable_mapping == 1 || hasmapto (' <Plug>(pydocstring)' )
18+ nnoremap <silent> <buffer> <Plug> (pydocstring) :call pydocstring#insert()<CR>
19+ if ! hasmapto (' <Plug>(pydocstring)' )
20+ nmap <silent> <C-l> <Plug> (pydocstring)
21+ endif
1622endif
1723
1824let &cpo = s: save_cpo
You can’t perform that action at this time.
0 commit comments