[Fix #1668] Don't enable Vim key bindings if holy-mode
This commit is contained in:
parent
78b39f1f72
commit
ae48bd866b
|
@ -228,10 +228,23 @@
|
||||||
"msR" 'python-shell-send-region-switch
|
"msR" 'python-shell-send-region-switch
|
||||||
"msr" 'python-shell-send-region)
|
"msr" 'python-shell-send-region)
|
||||||
|
|
||||||
(define-key inferior-python-mode-map (kbd "C-j") 'comint-next-input)
|
;; Emacs users won't need these key bindings
|
||||||
(define-key inferior-python-mode-map (kbd "C-k") 'comint-previous-input)
|
(when (eq dotspacemacs-editing-style 'vim)
|
||||||
(define-key inferior-python-mode-map (kbd "C-l") 'comint-clear-buffer)
|
;; the default in Emacs is M-n
|
||||||
(define-key inferior-python-mode-map (kbd "C-r") 'comint-history-isearch-backward))))
|
(define-key inferior-python-mode-map (kbd "C-j") 'comint-next-input)
|
||||||
|
;; the default in Emacs is M-p and this key binding overrides default C-k
|
||||||
|
;; which prevents Emacs users to kill line
|
||||||
|
(define-key inferior-python-mode-map (kbd "C-k") 'comint-previous-input)
|
||||||
|
;; the default in Emacs is M-r; C-r to search backward old output
|
||||||
|
;; and should not be changed
|
||||||
|
(define-key inferior-python-mode-map (kbd "C-r") 'comint-history-isearch-backward)
|
||||||
|
;; this key binding is for recentering buffer in Emacs
|
||||||
|
;; it would be troublesome if Emacs user
|
||||||
|
;; Vim users can use this key since they have other key
|
||||||
|
(define-key inferior-python-mode-map (kbd "C-l") 'comint-clear-buffer))
|
||||||
|
|
||||||
|
;; add this optional key binding for Emacs user, since it is unbound
|
||||||
|
(define-key inferior-python-mode-map (kbd "C-c M-l") 'comint-clear-buffer))))
|
||||||
|
|
||||||
(defun python/post-init-flycheck ()
|
(defun python/post-init-flycheck ()
|
||||||
(add-hook 'python-mode-hook 'flycheck-mode))
|
(add-hook 'python-mode-hook 'flycheck-mode))
|
||||||
|
|
Loading…
Reference in a new issue