Fixes #236 custom ex-command and M-x command key

New variable: dotspacemacs-command-key
This commit is contained in:
syl20bnr 2014-12-10 22:12:19 -05:00
parent 1f1f2d4e4d
commit be11d44009
4 changed files with 14 additions and 2 deletions

View File

@ -32,7 +32,7 @@ which require an initialization must be listed explicitly in the list.")
(key-chord-define ido-completion-map (kbd "jk")
(cdr (assoc 'ido-mode evil-leader--mode-maps))))
(evil-leader/set-key ":" 'spacemacs/smex)
(evil-leader/set-key dotspacemacs-command-key 'spacemacs/smex)
(evil-leader/set-key "m:" 'spacemacs/smex-major-mode-commands)
(global-set-key (kbd "M-x") 'smex)
(global-set-key (kbd "M-X") 'smex)

View File

@ -13,6 +13,11 @@ Paths must have a trailing slash (ie. `~/.mycontribs/')"
(defvar dotspacemacs-leader-key "SPC"
"The leader key.")
(defvar dotspacemacs-command-key ":"
"The key used for Evil commands (ex-commands) and Emacs commands (M-x).
By default the command key is `:' so ex-commands are executed like in Vim
with `:' and Emacs commands are executed with `<leader> :'.")
(defvar dotspacemacs-guide-key-delay 0.4
"Guide-key delay in seconds.")

View File

@ -23,6 +23,11 @@
dotspacemacs-default-theme 'solarized-light
;; The leader key
dotspacemacs-leader-key "SPC"
;; The command key used for Evil commands (ex-commands) and
;; Emacs commands (M-x).
;; By default the command key is `:' so ex-commands are executed like in Vim
;; with `:' and Emacs commands are executed with `<leader> :'.
dotspacemacs-command-key ":"
;; Guide-key delay in seconds. The Guide-key is the popup buffer listing
;; the commands bound to the current keystrokes.
dotspacemacs-guide-key-delay 0.4

View File

@ -602,6 +602,8 @@ determine the state to enable when escaping from the insert state.")
(let ((state (intern (format "evil-%s-state" spacemacs-last-base-state))))
(funcall state))))
;; evil ex-command key
(global-set-key (kbd dotspacemacs-command-key) 'evil-ex)
;; Make evil-mode up/down operate in screen lines instead of logical lines
(define-key evil-normal-state-map "j" 'evil-next-visual-line)
(define-key evil-normal-state-map "k" 'evil-previous-visual-line)
@ -1149,7 +1151,7 @@ determine the state to enable when escaping from the insert state.")
helm-buffers-fuzzy-matching t
helm-always-two-windows t)
(evil-leader/set-key
":" 'helm-M-x
dotspacemacs-command-key 'helm-M-x
"bs" 'helm-mini
"sl" 'helm-semantic-or-imenu
"hb" 'helm-bookmarks