Friday, April 29, 2011

Re: Language switching shortcuts

On 04/29/2011 12:48 PM, Kevin Steinhardt wrote:
> <F11> would do `set spelllang=en_gb` then `set spell`
> <F12> would do `set spelllang=nl` then `set spell` also

For normal-mode, it's a pretty straight-forward

:nnoremap <f11> :set spellang=eng_gb spell<cr>
:nnoremap <f12> :set spelllang=nl spell<cr>

If you want to be able to toggle within insert mode, you can do
the above mixed with

:imap <f11> <c-o><f11>
:imap <f12> <c-o><f12>

or you can make explicit mappings

:inoremap <f11> <c-o>:set spellang=eng_gb spell<cr>
:inoremap <f12> <c-o>:set spelllang=nl spell<cr>

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: