1

I guess that :py command is executed by some kind of extended Python interpreter. This extended Python has vim package available:

:py import vim; print(dir(vim)); print(vim.__package__, vim.__name__)

outputs:

['Buffer', 'Dictionary', 'Function', 'List', 'Options', 'Range', 'TabPage', 
'VAR_DEF_SCOPE', 'VAR_FIXED', 'VAR_LOCKED', 'VAR_SCOPE', 'VIM_SPECIAL_PATH', 'Window',
'_Loader', '__doc__', '__name__', '__package__', '_chdir', '_fchdir', '_find_module',
'_get_paths', '_getcwd', '_load_module', 'bindeval', 'buffers', 'chdir', 'command',
'current', 'error', 'eval', 'fchdir', 'find_module', 'foreach_rtp', 'options', 'os',
'path_hook', 'strwidth', 'tabpages', 'vars', 'vvars', 'windows']
(None, 'vim')

Where could I find the documentation of this vim package?

  • I have found some kind of documentation vimhelp.org/if_pyth.txt.html. Is there a more detailed documentation or even source code? – niekas Apr 18 at 3:22
  • The help file is the documentation. Or have a look at the source code in the vim repository. – Christian Brabandt Apr 18 at 5:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.