codemirror-vim icon indicating copy to clipboard operation
codemirror-vim copied to clipboard

Feature: version command

Open Opisek opened this issue 1 year ago • 4 comments

Given how CodeMirror is used in many different applications, including closed-source ones, I believe adding a :version command would simplify hunting down bugs in the wild. Currently, there is no way to tell the version of CodeMirror-Wim running on some given application.

I can look into implementing that, though it must be discussed what the approach for getting the current version makes the most sense. I would like to avoid hard-coding the value.

Opisek avatar Jun 27 '24 14:06 Opisek

we could use something like https://github.com/replit/codemirror-vim/pull/181, but sadly codemirror 6 does not have an equivalent of https://codemirror.net/5/doc/manual.html#version, so we can display only version of codemirror-vim itself

nightwing avatar Jun 27 '24 21:06 nightwing

That looks great. Perhaps it's worth going upstream to implement CodeMirror.version, too? It shouldn't be a difficuilt addition.

Opisek avatar Jun 28 '24 10:06 Opisek

It, indeed, may be useful. I'll update the version command in vim if/when CodeMirror.version is available.

nightwing avatar Jun 28 '24 13:06 nightwing

It seems it might be unlikely to get support upstream: https://github.com/codemirror/dev/issues/1398

Your addition is already great, though, and will certainly come in helpful in the future.

Opisek avatar Jul 01 '24 06:07 Opisek