Vale Prose Linting#

With sphinx up and running, the next step is getting the prose linter setup and configured.

Vale is NLP-powered (Natural Language Processing) linter for prose. The Vale website is well documented and explains the options and configurations available.

What drew me to Vale was that it can be as opinionated as I, the writer want it to be. It’s not a one size fits all and I customise per project.

Here, I explain my setup.


Installation on my MacOS is via brew.

brew install vale


Vale requires a .vale.ini file. The Vale website offers a useful configuration generator under the resources tab.

I copy and paste the configuration setting, create the .vale.ini file and run:

vale sync

Vale is now ready to run from the command line.


Vale and Vim#

I write this blog, my code and documentation in vim. I install vale as my linter by adding the following to my .vimrc.

let g:ale_linters = {'markdown': ['vale'], 'text':['vale']}

To ensure the quick change of case of my titles, I use vim-caser. The [vim-caser repository.](]( My settings are as follows:

Plug 'arthurxavierx/vim-caser'

And my go-to command is gss. This command changes the selected text to sentence casing. I use this for titles.

My Style#

Vale offers a selection of ready to install styles guides, each containing a plethora of their own rules. My system has been to enable one package at a time and select the useful rules that suit my style. For example the rule to avoid using the first person, is not useful for my blog content but is for my code documentation.

This is where distinct .vale.ini setups are great. By altering the BasedOnStyles value I can select specific folders and paths to the rules I want activated.

I create a folder for blog, and another for code.

I also create folders for specific vocabulary, and in each place an empty accept.txt and reject.txt. This allows me to circumvent the spell checker errors where necessary.

My basic vale.ini looks something like this.

Vocab = Tech

# To limit the file types linted.
# [*.md]
# To limit the syles rules applied simplly remove or add to the references
# BasedOnStyles = Vale, code, write-good, my-writing-space
BasedOnStyles = Vale, blog, write-good, my-writing-space

As I continue to fine tune what rules work for my style and the project in question, I continue to evolve the folders’ contents.

For example, for documentation I enforce the sentence case rule for titles and headings, whereas for this blog I prefer a capitalise-all rule for titles and headings.

I keep my base case vale setup on github and clone it when I need it.

#source Vale website

[vim-caser repository](](

Melissa McEwen github