💾 Archived View for bbs.geminispace.org › s › vim › 2658 captured on 2024-08-31 at 15:09:25. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-06-16)

-=-=-=-=-=-=-

Comment by 🚀 stack

Re: "What is the best way to write a plugin in Lua and C?"

In: s/vim

— https://vi.stackexchange.com/questions/35176/how-to-get-the-lua-version-of-neovim

I know its neovim, but at least something...

🚀 stack [mod]

2023-07-02 · 1 year ago

2 Later Comments ↓

🐦 Arkaeriit [OP] · 2023-07-02 at 09:37:

@stack Thanks a lot. This works in normal Vim as well. Unlike Lua's builtin _VERSION, this also shows the patch level which is exactly what we I need to download a Lua version.

🐦 Arkaeriit [OP] · 2023-07-02 at 10:07:

I managed to make it work. Thanks again @stack.

Original Post

🌒 s/vim

What is the best way to write a plugin in Lua and C? — I wrote a plugin to use Vim as a hex editor. As there is quite a bit of computation to do I prefered not to do them in Vimscript. As the hex editor will manipulate arbitrary data and not text, Lua seemed a better choice than Python as the strings don't need to contain only Unicode characters. As some functions do heavy computation, I wrote them in C for the very substantial speed boost. Unfortunately, compiling the C librairy is not...

💬 Arkaeriit · 3 comments · 2023-07-02 · 1 year ago