Skip to content

[WIP] Preliminary empty draft about the python interface#66

Open
bstaletic wants to merge 1 commit into
vim-advent-calendar:masterfrom
bstaletic:master
Open

[WIP] Preliminary empty draft about the python interface#66
bstaletic wants to merge 1 commit into
vim-advent-calendar:masterfrom
bstaletic:master

Conversation

@bstaletic

Copy link
Copy Markdown

The plan is do go in details about the python interface. This would
include:

  • The basic inline python and calling python functions from the vim
    command line.
  • Checking that vim has been compiled with python support and
    correctly* invoking python from inside vim.
  • Becoming friends with import vim - an in depth showcase of what vim
    exposes through this embedded python module and how to work around
    limitations when encountered.
  • Approach to writing an abstraction over the "raw" vim module,
    because conversions from a vim type to a python type can have surprising
    results.
    • There should be a special part about handling unicode, because
      python2/python3 differences here make passing a vim 'šт®ïñг' to python
      an easy foot-gun.

* Maybe also mention that no matter what, some non-working python enabled vim installations exist? For example, the default vim on the latest macOS has broken python support, causing python to raise MemoryError at best and make vim segfault at worst.

NOTE: As you can see, this is an empty PR. I'll be able to work on this after the 15th of July, but @romainl asked me to post an empty PR anyway. For reference, the discussion is here.

The plan is do go in details about the python interface. This would
include:

- The basic inline python and calling python functions from the vim
command line.
- Checking that vim has been compiled with python support and
correctly\* invoking python from inside vim.
- Becoming friends with `import vim` - an in depth showcase of what vim
exposes through this embedded python module and how to work around
limitations when encountered.
- Approach to writing an abstraction over the "raw" `vim` module,
because conversions from a vim type to a python type can have surprising
results.
  - There should be a special part about handling unicode, because
python2/python3 differences here make passing a vim `'šт®ïñг'` to python
an easy foot-gun.
@djmoch

djmoch commented Jun 21, 2019 via email

Copy link
Copy Markdown
Contributor

@romainl

romainl commented Jan 2, 2020

Copy link
Copy Markdown
Contributor

@bstaletic Is it safe to assume that you won't be able to finish this article?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants