From 80595884bae87d30df4a4f9bc57e203f664e43e8 Mon Sep 17 00:00:00 2001 From: Markus Bertheau Date: Sun, 30 Aug 2015 10:33:02 +0200 Subject: [PATCH] Make cursor keys work The goal is to have the cursor keys work in all places where hjkl work as directional keys. This is only a start. --- spacemacs/keybindings.el | 16 ++++++++++++++++ spacemacs/packages.el | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/spacemacs/keybindings.el b/spacemacs/keybindings.el index dd70a141f..9c931c727 100644 --- a/spacemacs/keybindings.el +++ b/spacemacs/keybindings.el @@ -301,13 +301,21 @@ Ensure that helm is required before calling FUNC." "wc" 'delete-window "wd" 'spacemacs/toggle-current-window-dedication "wH" 'evil-window-move-far-left + "w " 'evil-window-move-far-left "wh" 'evil-window-left + "w " 'evil-window-left "wJ" 'evil-window-move-very-bottom + "w " 'evil-window-move-very-bottom "wj" 'evil-window-down + "w " 'evil-window-down "wK" 'evil-window-move-very-top + "w " 'evil-window-move-very-top "wk" 'evil-window-up + "w " 'evil-window-up "wL" 'evil-window-move-far-right + "w " 'evil-window-move-far-right "wl" 'evil-window-right + "w " 'evil-window-right "wm" 'spacemacs/toggle-maximize-buffer "wM" 'spacemacs/toggle-maximize-centered-buffer "wo" 'other-frame @@ -470,13 +478,21 @@ Ensure that helm is required before calling FUNC." ("C" delete-other-windows :doc (spacemacs//window-manipulation-layout-doc)) ("g" spacemacs/toggle-golden-ratio :doc (spacemacs//window-manipulation-gratio-doc)) ("h" evil-window-left :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-left :doc (spacemacs//window-manipulation-move-doc)) ("j" evil-window-down :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-down :doc (spacemacs//window-manipulation-move-doc)) ("k" evil-window-up :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-up :doc (spacemacs//window-manipulation-move-doc)) ("l" evil-window-right :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-right :doc (spacemacs//window-manipulation-move-doc)) ("H" evil-window-move-far-left :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-move-far-left :doc (spacemacs//window-manipulation-move-doc)) ("J" evil-window-move-very-bottom :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-move-very-bottom :doc (spacemacs//window-manipulation-move-doc)) ("K" evil-window-move-very-top :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-move-very-top :doc (spacemacs//window-manipulation-move-doc)) ("L" evil-window-move-far-right :doc (spacemacs//window-manipulation-move-doc)) + ("" evil-window-move-far-right :doc (spacemacs//window-manipulation-move-doc)) ("o" other-frame :doc (spacemacs//window-manipulation-move-doc)) ("R" spacemacs/rotate-windows :doc (spacemacs//window-manipulation-move-doc)) ("s" split-window-below :doc (spacemacs//window-manipulation-split-doc)) diff --git a/spacemacs/packages.el b/spacemacs/packages.el index a103e84a4..880516894 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -712,6 +712,11 @@ ;; toggle maximize buffer (define-key evil-window-map (kbd "o") 'spacemacs/toggle-maximize-buffer) (define-key evil-window-map (kbd "C-o") 'spacemacs/toggle-maximize-buffer) + ;; make cursor keys work + (define-key evil-window-map (kbd "") 'evil-window-left) + (define-key evil-window-map (kbd "") 'evil-window-right) + (define-key evil-window-map (kbd "") 'evil-window-up) + (define-key evil-window-map (kbd "") 'evil-window-down) (evil-leader/set-key "re" 'evil-show-registers)