danr / kakoune-easymotion

kakoune plugin for navigating like the easymotion vim mode
The Unlicense
53 stars 13 forks source link

Why not a separate python file instead of writting python from bash ? #26

Closed joeitu closed 4 years ago

joeitu commented 4 years ago

Hi !

Even if the code is small, I have a very hard time understanding it. I'm confused by the fact that you write python inside a .kak file. Is this just to keep everything in one file or is they any other reason ?

danr commented 4 years ago

Hi! The code was written mostly as a proof of concept and then people started using it. I removed some inefficiency issues in a haste at the expense of clarity. Hence the hard-to-understand code. About it being in one file the value for the current sourced file did not exist when this was written as far as I can recall. Otherwise a technique like this could be used: https://github.com/occivink/kakoune-gdb/blob/master/gdb.kak#L5

Feel free to send PR that splits the python file on its own.