Skip to content

Entries tagged "vim".

Vim: mixed fileencodings

Sometimes you have to edit files in different chatacters encodings using the same terminal (that is configured, let's say, for UTF-8). It's very easy by using the following Vim configuration:

set fileencodings=utf-8,iso-8859-2

This setting allows Vim to automatically detect encoding from list and select first that match. If your terminal is in different encoding file will be converted on-the-fly.

Happy Vim-ing!

VIM internal spellchecker

In order to use VIM internal spellchecker just declare language used:

setlocal spell spelllang=en_us

And voila! All mispelled words will be highlighted by red background!

In order to add some words to dictionary, place cursor over such word and use "zg" command. Word will be marked as "correct" one. Looking at suggestions: "z=".

Pretty easy!