nathangrigg / vim-beancount

Vim ftplugin for beancount
161 stars 41 forks source link

Add python3 support #28

Closed xentac closed 8 years ago

xentac commented 8 years ago

This support also includes a new matching entity: event types. Event types aren't accessible with bean-query, so we need full api access for this one.

It should also make all matching faster because we make fewer passes through the beancount file (especially for different type matches). I'd really like to figure out a way to load the data in the background, but that may have to wait till vim 8... ;)

nathangrigg commented 8 years ago

The difference between this and the bean-query version is that the bean-query version is run once per vim instance (admittedly not ideal) while this parses the file on every completion (much slower)

As you say, the right thing to do would be to do it in the background. But in the mean time I think I prefer speed over correctness.

xentac commented 8 years ago

I can add the caching back, if you'd like. It is still way faster because it passes over each transaction element once and can often use the intermediate pickle file instead of re-parsing the text.

nathangrigg commented 8 years ago

Yes, I think we should add the caching back until we can do it asynchroneously

xentac commented 8 years ago

Caching re-added.