Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/comint keybindings #1759

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion contrib/shell/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

(add-to-list 'term-bind-key-alist '("<tab>" . term-send-tab)))))

(defun spacemacs/init-shell ()
(defun shell/init-shell ()
(defun shell-comint-input-sender-hook ()
"Check certain shell commands.
Executes the appropriate behavior for certain commands."
Expand All @@ -90,6 +90,18 @@
(interactive)
(let ((inhibit-read-only t))
(erase-buffer)))
(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