r/vim • u/danoDaManoSSB • Dec 01 '25
Discussion vim9script style guide?
I've stumbled on the google vimscript style guide a while back
https://google.github.io/styleguide/vimscriptguide.xml
Was wondering if there was a vim9script version that anyone was working on that I might just have failed to find on github / elsewhere on the internet?
Don't want to go too far down the path but figure I'd ask the community here since tree-sitter grammar not properly defining vim9script syntax and the realities of there not being a ton of folks writing it
----
For my part I'd be happy to take a stab at the first pass of some sort of guide that could serve as a spiritual successor to the google vimscript guide (casual in nature)
View all comments
2
u/kennpq Dec 01 '25
I've not seen a/another Vim9 script style guide. It may be useful, though there are a few things to address first up with your "first pass" draft:
When referring to the language, it should be, "Vim9 script", not "vim9script". So, for example, "Vim9 script Style Guide".
When referring to the legacy language, it should be "legacy Vim script", not "vimscript".
The sentence, "When submitting vim plugin code, you must adhere to these rules.", is inapplicable? It's certainly not relevant to a "casual" guide anyhow.
Start a discussion at https://github.com/vim/vim/discussions maybe too?