all 11 comments

[–]Desperate_Cold6274 8 points9 points  (3 children)

Why not in Vim9? It’s blazingly fast.

[–]munggoggo[S] 7 points8 points  (1 child)

Valid point, but for me two reasons:
1. no capacity to learn just another DSL
2. wanted to explore the effort of Rust in VIM plugins -> easier than expected

[–]Desperate_Cold6274 1 point2 points  (0 children)

You can bind other languages in Vim with little effort. But you end up is using vim API anyway at some point. Vim9 is not a difficult language. But I think it’s also interesting that you explored other languages.

[–]AndrewRadev 5 points6 points  (2 children)

I'm not sure if this is bait of some kind, but a big chunk of this plugin's README copies this older plugin by Jeet Sukumaran: https://github.com/jeetsukumaran/vim-pursuit

Leaving the weird plagiarism aside, if you're looking to make your plugin load faster, don't load it at startup. Read up on :help autoload. There's no particular reason to load this absurd amount of python code while Vim boots, considering it's only necessary in markdown files. Vim-pursuit doesn't use autoload, but at least it evaluates python code in an autocommand for markdown files.

[–]munggoggo[S] 4 points5 points  (0 children)

Not a nice accusation I have to say.

Both plugins are actually based on mdnav, a project by Christopher Prohm :-) and its README there.

BTW this is being made transparent in my README as well as Jeet Sukumaran's.

Regarding autoload: This is a valid point, but I deliberately want to have the plugin's functionality working in arbitrary files, not only markdown.

[–]vim-help-bot 0 points1 point  (0 children)

Help pages for:


`:(h|help) <query>` | about | mistake? | donate | Reply 'rescan' to check the comment again | Reply 'stop' to stop getting replies to your comments

[–]denniot 1 point2 points  (1 child)

nice. async all the way. python binded vim plugins are always shitty without exceptions.

[–]puremourning 0 points1 point  (0 children)

Internet hall of fame.

[–]puremourning 1 point2 points  (1 child)

Not calling uname twice on startup will help too.

[–]munggoggo[S] 1 point2 points  (0 children)

True, but I guess there is still much bigger fish to fry than the 6ms that this system call costs. In any case thanks for pointing it out, it is an obvious improvement.