1 minute read

Vimscript has been an old time favourite; seeing that I am composing this blog post in Vim. My decision to use Vimscript here was to use vim9script in solving the problems on Exercism. Vimscript is the language for scripting Vim, the editor. Since the language is primarily scoped to the editor, I wouldn’t consider it a versatile programming language as such; it’s niche. No one should be writing embedded software in Vimscript — although I know my saying this would mean someone would see it as a #challenge; please don’t. The runtime for Vimscript is within Vim. So any program in Vimscript must be run in Vim.

Vimscript allows Vim to transition from just a text editor, to a personal development environment (a.k.a PDE). In contrast to an IDE (integrated development environment), a PDE fits all™ your use cases like a glove; while an IDE tries to pre-empt what you may need and bake it into the software. It is plenty fun to create a PDE which fits the way you want to interact with text: code, data, configuration, and all other forms. Vim 9 comes with vim9script which transitions legacy vimscript into something more modern. New concepts can be found in :h new-9.

Exercism in Vim 9 wasn’t too much of a hassle. Exercism gives boilerplate code in legacy vimscript. I had to transition this to Vim 9. Here’s an example commit doing just that.

Things I learned…


Leave a comment