Name: vimscript
Owner: exercism
Description: Exercism exercises in Vim script.
Created: 2017-02-20 22:12:38.0
Updated: 2017-12-13 19:38:41.0
Pushed: 2018-02-07 16:28:30.0
Homepage: http://exercism.io/languages/vimscript
Size: 134
Language: Vim script
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
We welcome any kind of contribution!
If you have a suggestion or question, create a new issue.
For code or fixing typos and similar things, open a pull request.
Look at recent commits to get a feeling on how to format your own ones.
Even if there are any uncertainties, go for it nevertheless. We can straighten out everything in the process.
Thank you for contributing! :tada:
If you add or change a Vim file, the CI will use vint to ensure best practices. Therefore it's recommended idea to run it locally first, before creating a pull request.
nt .
Use the generator to create Vader files from their canonical test data:
Vim
rce lib/generate.vim
erate word-count
This would fetch the canonical test data, decode the JSON to Vim data types, iterate over the result, and put the tests in a new unnamed buffer.
This script requires Vim 7.4.1304+ for json_decode()
. It also relies on the
netrw plugin (:h netrw
), but that one is shipped and sourced by default.
Older Vims don't like changing types for the same variable. If your tests use
global variables, unlet!
them in a Before
block at the top of the Vader file.
When each test uses let expected = ...
, then put this at the top:
re:
let! expected
This is patched as of Vim 7.4.1546, but we shouldn't assume versions in favor of compatibility.