web-dev-qa-db-ja.com

Vimのスペルチェックで新しい単語を記憶させる方法

ラテックス編集にgvimを使用しています。私はvim辞書が知らない単語で多くの科学的文書を書いています。スペルチェックを実行しているときに、スペルが正しいことがわかっている単語を見つけた場合、それらの単語を辞書に追加するにはどうすればよいですか。

69
Andrew Redd

Vimマニュアルから:

To add words to your own Word list:

zg       Add Word under the cursor as a good Word to the first
         name in 'spellfile'.  A count may precede the command
         to indicate the entry in 'spellfile' to be used.  A
         count of two uses the second entry.

         In Visual mode the selected characters are added as a
         Word (including white space!).
         When the cursor is on text that is marked as badly
         spelled then the marked text is used.
         Otherwise the Word under the cursor, separated by
         non-Word characters, is used.

         If the Word is explicitly marked as bad Word in
         another spell file the result is unpredictable.


zG       Like "zg" but add the Word to the internal Word list
         |internal-wordlist|.


zw       Like "zg" but mark the Word as a wrong (bad) Word.
         If the Word already appears in 'spellfile' it is
         turned into a comment line.  See |spellfile-cleanup|
         for getting rid of those.


zW       Like "zw" but add the Word to the internal Word list
         |internal-wordlist|.

zuw
zug      Undo |zw| and |zg|, remove the Word from the entry in
         'spellfile'.  Count used as with |zg|.

zuW
zuG      Undo |zW| and |zG|, remove the Word from the internal
         Word list.  Count used as with |zg|.

コマンドラインで:

:[count]spe[llgood] {Word}
         Add {Word} as a good Word to 'spellfile', like with
         |zg|.  Without count the first name is used, with a
         count of two the second entry, etc.

:spe[llgood]! {Word} Add {Word} as a good Word to the internal Word list,
         like with |zG|.


:[count]spellw[rong] {Word}
         Add {Word} as a wrong (bad) Word to 'spellfile', as
         with |zw|.  Without count the first name is used, with
         a count of two the second entry, etc.

:spellw[rong]! {Word}   Add {Word} as a wrong (bad) Word to the internal Word
         list, like with |zW|.

:[count]spellu[ndo] {Word}
         Like |zuw|.  [count] used as with |:spellgood|.

:spellu[ndo]! {Word} Like |zuW|.  [count] used as with |:spellgood|.

Vimのスペルの詳細については、:help spellまたは:help spell-quickstartと入力してください

86
DaveParillo