VIM を使用した構文強調表示を読み取れません。

VIM を使用した構文強調表示を読み取れません。

SpellBad私が持っているハイライトが好きなのは当然のことです。文法的な部分を調整する魔法の方法は何ですか?

これは私の.vimrcです。

set spell spelllang=en_us
hi clear SpellBad
hi SpellBad cterm=underline ctermfg=red

醜いハイライト

ベストアンサー1

  1. vim構文チェックは行われません。これを明示的に指定します(例:32行/usr/share/vim/vim82/doc/spell.txt:help spellvim

     Vim only checks words for spelling, there is no grammar check.
    
  2. AFAICTその恐ろしいターコイズテキストを詳しく見てみると、大文字の使用問題のようです("this"は"This"として大文字として使用する必要があります)。以下を追加してみてください.vimrc

     hi SpellCap cterm=underline ctermfg=red
    

ちなみに、同じspell.txt文書には次のように記載されています。

The words that are not recognized are highlighted with one of these:
    SpellBad    word not recognized                 |hl-SpellBad|
    SpellCap    word not capitalised                |hl-SpellCap|
    SpellRare   rare word                           |hl-SpellRare|
    SpellLocal  wrong spelling for selected region  |hl-SpellLocal|

おすすめ記事