Skip to content

Commit

Permalink
made keybinding only available in vim editing style
Browse files Browse the repository at this point in the history
  • Loading branch information
mijoharas committed May 28, 2015
1 parent 34e4276 commit 509812c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions contrib/shell/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,18 @@
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)))
(defun setup-keys-for-comint-mode ()
(progn
(evil-define-key 'insert comint-mode-map
(kbd "C-k") 'comint-previous-input
(kbd "C-j") 'comint-next-input)
(evil-define-key 'normal comint-mode-map
(kbd "C-k") 'comint-previous-input
(kbd "C-j") 'comint-next-input)
))
(add-hook 'comint-mode-hook 'setup-keys-for-comint-mode)
(when (eq dotspacemacs-editing-style 'vim)
(defun setup-keys-for-comint-mode ()
(progn
(evil-define-key 'insert comint-mode-map
(kbd "C-k") 'comint-previous-input
(kbd "C-j") 'comint-next-input)
(evil-define-key 'normal comint-mode-map
(kbd "C-k") 'comint-previous-input
(kbd "C-j") 'comint-next-input)
))
(add-hook 'comint-mode-hook 'setup-keys-for-comint-mode)
)
(add-hook 'shell-mode-hook 'shell-comint-input-sender-hook)
(add-hook 'eshell-mode-hook (lambda ()
(setq pcomplete-cycle-completions nil))))
Expand Down

0 comments on commit 509812c

Please sign in to comment.