Can you explain the problem better? What is it that doesn't work?
On 13 March 2013 04:26, <mattn.jp@gmail.com> wrote:
> Reviewers: golang-dev1,
>
> Message:
> Hello golang-dev@googlegroups.com,
>
> I'd like you to review this change to
> https://go.googlecode.com/hg/
>
>
> Description:
> misc/vim: ':Godoc' command does not work with 'log.Print'
>
> Please review this at
https://codereview.appspot.**com/7757043/<https://codereview.appspot.com/7757...
>
> Affected files:
> M misc/vim/plugin/godoc.vim
>
>
> Index: misc/vim/plugin/godoc.vim
> ==============================**==============================**=======
> --- a/misc/vim/plugin/godoc.vim
> +++ b/misc/vim/plugin/godoc.vim
> @@ -70,13 +70,19 @@
> function! s:Godoc(...)
> let word = join(a:000, ' ')
> if !len(word)
> - let word = expand('<cword>')
> + let word = expand('<cWORD>')
> endif
> let word = substitute(word, '[^a-zA-Z0-9\\/._~-]', '', 'g')
> - if !len(word)
> + let words = split(word, '\.')
> + if !len(words)
> return
> endif
> - call s:GodocWord(word)
> + call s:GodocWord(words[0])
> + if len(words) > 1
> + if search('^func ' . words[1]) == 0
> + echo 'No documentation found for "' . word . '".'
> + endif
> + endif
> endfunction
>
> command! -nargs=* -range -complete=customlist,go#**complete#Package
> Godoc :call s:Godoc(<q-args>)
>
>
> --
>
> ---You received this message because you are subscribed to the Google
> Groups "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegrou...
> .
> For more options, visit
https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/o...
> .
>
>
>
> Can you explain the problem better? What is it that doesn't work?
ex:
-----------
log.Print(strings.TrimSpace(""))
-----------
When cursor is on strings.TrimSpace, :Godoc have better to show doc of strings
and find the part of TrimSpace. And When cursor is on "log.Print", it have
better to show doc of "log.Print".
*** Submitted as https://code.google.com/p/go/source/detail?r=319d13f7fda0 *** misc/vim: make Godoc command work with "log.Print". R=dsymonds CC=golang-dev https://codereview.appspot.com/7757043 ...
Issue 7757043: code review 7757043: misc/vim: ':Godoc' command does not work with 'log.Print'
Created 12 years ago by mattn
Modified 12 years ago
Reviewers:
Base URL:
Comments: 7