Use jump-forward `C-i` binding only in GUI mode

Background: `C-i` and `TAB` are the same keycode for historic reasons.

With the current settings, evil [1] and evil-jumper [2] associate
`jump-forward` to `C-i` (==`TAB`), what overrides bindings set to
`TAB` (==`C-i`) in terminal mode, like `orc-cycle`. To fix this,
this commit:

- Set `evil-want-C-i-jump` to `nil`, to prevent `evil` and `evil-jumper`
  to use the `C-i` (==`TAB`) keycode.

- Remove the spacemacs' code that bind `jump-forward` to `TAB`(==`C-i`)

The current spacemacs code already rebind `jump-forward` to the GUI-only
`<C-i>` keycode.

[1] 082bd65ccc/evil-maps.el?fileviewer=file-view-default#evil-maps.el-323
[2] efaa841ca4/evil-jumper.el (L241)

Fix #4505
Fix #4487
This commit is contained in:
Fabien Dubosson 2016-01-09 18:25:02 +01:00
parent 21a4fbf2b4
commit 72a89ab312
2 changed files with 6 additions and 4 deletions

View File

@ -60,9 +60,13 @@
;; explicitly set the prefered coding systems to avoid annoying prompt
;; from emacs (especially on Microsoft Windows)
(prefer-coding-system 'utf-8)
;; TODO move evil-want-C-u-scroll when evil is removed from the bootstrapped
;; TODO move these variables when evil is removed from the bootstrapped
;; packages.
(setq-default evil-want-C-u-scroll t)
(setq-default evil-want-C-u-scroll t
;; `evil-want-C-i-jump' is set to nil to avoid `TAB' being
;; overlapped in terminal mode. The GUI specific `<C-i>' is used
;; instead (defined in the init of `evil-jumper' package).
evil-want-C-i-jump nil)
(dotspacemacs/load-file)
(require 'core-configuration-layer)
(dotspacemacs|call-func dotspacemacs/init "Calling dotfile init...")

View File

@ -587,10 +587,8 @@
(lambda ()
(if evil-jumper-mode
(progn
(define-key evil-motion-state-map (kbd "TAB") 'evil-jumper/forward)
(define-key evil-motion-state-map (kbd "<C-i>") 'evil-jumper/forward)
(define-key evil-motion-state-map (kbd "C-o") 'evil-jumper/backward))
(define-key evil-motion-state-map (kbd "TAB") 'evil-jump-forward)
(define-key evil-motion-state-map (kbd "<C-i>") 'evil-jump-forward)
(define-key evil-motion-state-map (kbd "C-o") 'evil-jump-backward))))
(evil-jumper-mode t)