0

I use MacVim for coding and for my notes.

I write my notes in danish, so i want to be able to change the language of the text in my GUI (not in the menu), so i don't have to watch these: enter image description here.

I read about it and found that you can do :language help in MacVim, where you can read that you can change the language and see your locales files by running locale -a in the terminal. I found, that da_DK.UTF-8 was listed.

When i change my language message settings with :lan mes da_DK.UTF-8 it switches, but my text in the current file is still underlined with the red error line.

If i open a new file the language is danish, but i want to be able to change it on the fly.

How to do this?


I tried:

Running :e without a filename as mentioned here where they talk about refreshing to read a config file - but it didn't work.

Any suggestions?

1 Answers1

1

I figured it out learning from this answer!

You can put a language in your ~/.vim/spell/ folder.

For danish:

http://ftp.vim.org/pub/vim/runtime/spell/da.utf-8.spl

http://ftp.vim.org/pub/vim/runtime/spell/da.utf-8.sug

And then in MacVim you can change language by calling :set spelllang=da !!!


Note:

You can (of course) make a shortcut in your .vimrc file:

" Set english and danish spelling easy
nmap <Leader>da :set spelllang=da<CR>
nmap <Leader>en :set spelllang=en<CR>