Spell checking support for camelCase words in vim
Support spell checking of camelCase words.
It overrides vim’s built in spellchecker for camelCase words.
Before installation, please check your Vim supports python by running :echo has('python3')
.
You can install camelspell like any other plugins.
Add the plugin in your .vimrc
Plug 'tnagorra/camelspell'
Run the following commands:
:source %
:PlugInstall
" Time after which spell check will be run after text is changed
let g:camelspell_delay = 100
" Invoke spell check on file open
let g:camelspell_check_on_startup = 1
" Invoke spell check on text change
let g:camelspell_check_on_text_change = 1
" Invoke spell check on save
let g:camelspell_check_on_save = 1
# vim regex
\v(\a|\d)+(\u(\l|\d)+|\u@<!\u+)(\w)@!
# python regex
[0-9A-Za-z]+(?:[A-Z][a-z0-9]+|(?<![A-Z])[A-Z]+)(?!\w)
# Following words are camelcase
PescalXXXCase
cemelXXXCase
XXXPescalCase
XXXcemelCase
I18Word
pescalCASE
cemelCASE
# Following words are not camelcase
CEMEL_CASE
CEMEL
snek_case
Snekcase
Snek_case
BufDelete