If you and your teammates use Vim, these techniques can help avoid spelling mistakes.
Set up Vim spell-checking and word completion
on your machine's
setlocal complete+=kspell setlocal spell setlocal spellfile=$HOME/.vim-spell-en.utf-8.add " any dir outside project repo
Each member of the team
can opt-in to a project-specific
by setting the following in their
Then, add the project-specific
.vimrc file to the Git repo:
" http://andrew.stwrt.ca/posts/project-specific-vimrc/ set secure set spellfile=en.utf-8.add set spelllang=en_us
This is merged with the machine-wide settings.
When reviewing a Git commit in Vim with
git commit -v,
Vim will highlight misspelled words.
Move to the next misspelled word with
(or move backwards with
zg ("good word") to
add the word to the custom spell file:
Add a phrase (words with whitespace between them) to the spell file
by selecting characters in Visual mode and then typing
When the cursor is over a misspelled word,
get suggestions for the word with
The words in the spell file will show up in tab completion
.vimrc is configured with
Shared spell file
Add the plain-text spell file,
to version control in the project.
Vim uses a binary version,
as a data structure to improve performance.
Ignore the binary version in
because it will be automatically updated and reloaded when words
are added with
en.utf-8.add might look something like this:
RSS SEO Trello URL YAML backticks blog iOS repo stylesheet thoughtbot vimrc
If you edit the file manually, the binary version will not be updated and reloaded automatically. In that case, run:
:edit <spell file> (make changes to the spell file) :mkspell! %