Activating the native spell-checking on Vim

Developers write not only code but documentation, bug reports, commit messages. As a non-native English speaker, I always find myself using Hemingway App, Grammarly, and other similar tools. They help but it is quite annoying having to switch back and …


This content originally appeared on DEV Community and was authored by Vinicius Brasil

Developers write not only code but documentation, bug reports, commit messages. As a non-native English speaker, I always find myself using Hemingway App, Grammarly, and other similar tools. They help but it is quite annoying having to switch back and forth from my editor to these tools.

The good news is that Vim ships with a spell-checker. It can check for words that do not exist, wrong capitalization, and even words that were spelled wrong for the selected region.

To turn the spell-checking on, you can use this command:

:setlocal spell spelllang=en_us

You can also hook it to a specific file type, for example:

" this goes into your init.vim/.vimrc file
autocmd FileType gitcommit setlocal spell

Happy Vimming!


This content originally appeared on DEV Community and was authored by Vinicius Brasil


Print Share Comment Cite Upload Translate Updates
APA

Vinicius Brasil | Sciencx (2021-08-12T14:16:56+00:00) Activating the native spell-checking on Vim. Retrieved from https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/

MLA
" » Activating the native spell-checking on Vim." Vinicius Brasil | Sciencx - Thursday August 12, 2021, https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/
HARVARD
Vinicius Brasil | Sciencx Thursday August 12, 2021 » Activating the native spell-checking on Vim., viewed ,<https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/>
VANCOUVER
Vinicius Brasil | Sciencx - » Activating the native spell-checking on Vim. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/
CHICAGO
" » Activating the native spell-checking on Vim." Vinicius Brasil | Sciencx - Accessed . https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/
IEEE
" » Activating the native spell-checking on Vim." Vinicius Brasil | Sciencx [Online]. Available: https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/. [Accessed: ]
rf:citation
» Activating the native spell-checking on Vim | Vinicius Brasil | Sciencx | https://www.scien.cx/2021/08/12/activating-the-native-spell-checking-on-vim/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.