I noticed that with different colorschemes VIM is underlining/highlighting some words. Why is this and how to turn it off ?
It seems like your Vim is doing spell-checking for you. You can turn this off by adding
set nospell
in your .vimrc
file. To turn it back on in a file, you can do:
:setlocal spell spelllang=en_us
for spell-checking with American English. :setlocal
changes settings for current buffer, while :set
makes the changes for all currently open buffers. You can read more about how spell-checking with Vim works here.
It may be useful for you to automatically enable spell checking for certain files. For example, to enable spell checking in .tex
files, you can add the following to your .vimrc
:
" Enable spell checking when opening .tex files
autocmd!
au BufNewFile,BufRead *.tex setlocal spell spelllang=en_us
" Or if you have filetype detection enabled:
" au FileType tex setlocal spell spelllang=en_us
Note that autocmd!
clears the previously defined au
commands and is needed only once.