I do not mean to let vim check my spell automatically, so please do not tell me to add a autocmd ...
line in my vimrc
.
I created a .md
file and put these contents in it:
8) good fftowndn
Then I run the command :setlocal spell!
in the normal mode, but this does not check the wrong spell token of fftowndn
in my contents. However, the spell checking works well if I comment the contents.
How could I make spell checking work with .md
please ?
Edit: in other file types such as txt
file, after I run :setlocal spell!
, the error tokens of fftowndn
will be highlighted but here I do not see this highlight in the markdown file.
Edit2:
I come to find that the spell checking works well for the title marked with #
, ##
, ..., ######
, and from #######
on there will be no checking. It is the same with my markdown contents. If I do not mark my contents, there will be no spell checkings.
Edit3:
after various trying, I got to find the problem is likely to be with this line in my .vimrc
:
let g:markdown_fenced_languages = [
\ 'vim',
\ 'html',
\ 'css',
\ 'erb=eruby',
\ 'go',
\ 'java',
\ 'javascript',
\ 'js=javascript',
\ 'json=javascript',
\ 'ruby',
\ 'sass',
\ 'sql',
\ 'xml',
\ 'cpp',
\ 'python',
\ 'bash=sh',
\ 'cmake'
\]
I just need markdown to show highlight for me code in the block between '```' and '```' pairs, but I did not expect it will affect my spell check, how could I solve this?
]s
, does it jump to "fftowndn"?setlocal spell spelllang=LANG
(i may have speltspelllang
incorrectly). Can you clarify the precise contents via a code block, and describe the expected versus observed behavior?]s
, it means that the spelling error is not detected. If the cursor would move, then it is a highlighting problem..vimrc
that may switch off the spelling of markdown contents but not its comments?