Giter Club home page Giter Club logo

Comments (4)

powerman avatar powerman commented on August 15, 2024

Comment #1 originally posted by powerman on 2012-09-10T06:39:06.000Z:

Is it possible to autodetect python's version used in current file? Maybe it's somehow noted in script's first lines or $! shebang line?

from vim-plugin-viewdoc.

powerman avatar powerman commented on August 15, 2024

Comment #2 originally posted by powerman on 2012-09-10T08:32:50.000Z:

Excerpts from [ [email protected] ] //// On [2012-09-10 06:39:12 +0000]:

I think it is not good. Even sometimes some people will write shebang header
like bellowing:
#!/usr/bin/env python3

But this is not a convention. And there is not other ways to detect current
file's python version.

And I hope viewdoc can add command for python, viewdoc has command :ViewDoc_perl
for perl, but no command for python.
Two command: :ViewDoc_python (default for python3) and :ViewDoc_python2.

from vim-plugin-viewdoc.

powerman avatar powerman commented on August 15, 2024

Comment #3 originally posted by powerman on 2012-11-25T16:25:57.000Z:

I've checked how it works on my OS (Gentoo), and it differs from yours:

  • Gentoo provide system-wide way to switch between different versions of same package if they installed simultaneously using eselect python set python3.2. This result in changing pydoc command too - it show docs for selected python version.
  • There is no pydoc3 command on my system, but there are pydoc2.7 and pydoc3.2 commands.

So, it looks like running pydoc is sane defaults for any python version.
In case multiple python versions installed simultaneously and you need to view documentation for non-default python version actual command name (pydoc3 or pydoc3.2) is system-dependent and shouldn't be hardcoded in this plugin. Instead, user should be able to manually define any 'pydoc' command instead of default one. Something like this:

let g:viewdoc_pydoc_cmd = "pydoc3.2"

from vim-plugin-viewdoc.

powerman avatar powerman commented on August 15, 2024

Comment #4 originally posted by powerman on 2012-11-25T20:31:50.000Z:

https://code.google.com/p/vim-plugin-viewdoc/source/detail?r=690d27c5e951f2b93a26ac1dfd6ac8e48e1586a0

from vim-plugin-viewdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.