Skip to content
Browse files

Do final substitution on result of first.

Without it, it doesn't work on "handle = open(...)"
Comment what's being done.
  • Loading branch information...
1 parent 9547e6a commit 14ffe6cdd74e086271e4eb07ba94fe4bd5b94e26 Thomas Vander Stichele committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 pydoc.vim
View
4 pydoc.vim
@@ -49,8 +49,10 @@ function! ShowPyDoc(name, type)
set buftype=nofile
setlocal modifiable
normal ggdG
+ " remove function/method arguments
let s:name2 = substitute(a:name, '(.*', '', 'g' )
- let s:name2 = substitute(a:name, ':', '', 'g' )
+ " remove all colons
+ let s:name2 = substitute(s:name2, ':', '', 'g' )
if a:type==1
execute "silent read ! " . g:pydoc_cmd . " " . s:name2
else

0 comments on commit 14ffe6c

Please sign in to comment.
Something went wrong with that request. Please try again.