Skip to content

Instantly share code, notes, and snippets.

@mskorzhinskiy
Created February 24, 2016 20:30
Show Gist options
  • Save mskorzhinskiy/a3b038fe9ef6862dc0e2 to your computer and use it in GitHub Desktop.
Save mskorzhinskiy/a3b038fe9ef6862dc0e2 to your computer and use it in GitHub Desktop.
Snippet for setting language
(defun set-russian-language ()
(interactive)
(set-input-method "russian-computer")
(ispell-change-dictionary "ru"))
(defun set-english-language ()
(interactive)
;; todo remove this ugly hack someday
(set-input-method "russian-computer")
(toggle-input-method)
(ispell-change-dictionary "en"))
(defun set-deutsch-language ()
(interactive)
(set-input-method "german")
(ispell-change-dictionary "de"))
(spacemacs/set-leader-keys
"or" 'set-russian-language
"oe" 'set-english-language
"od" 'set-deutsch-language)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment