Multilingual spell checking in Vim - a partial HowTo.

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
globetrotterdk
Posts: 435
Joined: 26. Oct 2010, 13:57
Location: Denmark

Multilingual spell checking in Vim - a partial HowTo.

Post by globetrotterdk »

1) The first step to implementing multilingual spell checking in Vim, was to download the files I needed from this site ftp://ftp.vim.org/pub/vim/runtime/spell/. I downloaded both the "latin1" and "utf-8" files for each respective language (Danish and Bahasa Indonesia), making sure to get both the files with the extension .spl and .sug

2) I then ran the following command from the directory where the files had been downloaded

Code: Select all

# cp *.* /usr/share/vim/vim73/spell/
3) I then added the following to my ~/.vimrc file

Code: Select all

" ---- set spelling options ----

set spell			"  spell check
set spelllang=en_us		"  languages

" ---- toggle spelling control-E -> en, control-D -> da, control-I -> id ---- 
map     <C-E>    :setlocal spell! spelllang=en<CR>
imap    <C-E>    <ESC>:setlocal spell! spelllang=en<CR>i
map     <C-D>    :setlocal spell! spelllang=da<CR>
imap    <C-D>    <ESC>:setlocal spell! spelllang=da<CR>i
map     <C-I>    :setlocal spell! spelllang=id<CR>
imap    <C-I>    <ESC>:setlocal spell! spelllang=id<CR>i
4) The current problem is that I have to press the relevant key combination twice, before the spelling language (spelllang) is switched. Does anyone have any ideas how to solve this glitch?
Military justice is to justice what military music is to music. - Groucho Marx
Post Reply