forked from et2010/Han
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.el
executable file
·45 lines (38 loc) · 1.26 KB
/
config.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
;;; config.el --- Han Layer Configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; Variables
(defvar han-default-input-method 'pinyin
"The default chiense input method. Can be `wubi` or `pinyin`.")
(defvar han-enable-youdao-dict nil
"Enble YouDao Dict translation service.")
(defun pyim-use-dict:bigdict ()
(interactive)
(setq pyim-dicts
'((:name "BigDict"
:file "~/.emacs.d/.cache/pyim-bigdict.pyim"
:coding utf-8-unix
:dict-type pinyin-dict)))
(pyim-restart-1 t))
(defun pyim-helm-buffer-active-p ()
(string-prefix-p
"*helm"
(buffer-name
(window-buffer
(active-minibuffer-window))) t))
(defun pyim-turn-off-evil-escape ()
"Turn off evil escape by remapping the key."
(define-key evil-emacs-state-map
(kbd "<remap> <evil-escape-emacs-state>") 'self-insert-command))
(defun pyim-turn-on-evil-escape ()
"Turn on evil escape by reset key mapping to default."
(define-key evil-emacs-state-map
[remap evil-escape-emacs-state] nil))