Undo 1f23eecd
: un-homogenize TAB/RET/ESC
This is more trouble than its worth. Better to deal with the old edge cases than the new ones this causes. Addresses #1218
This commit is contained in:
parent
60c965ded8
commit
90f36bceff
3 changed files with 49 additions and 50 deletions
|
@ -44,12 +44,6 @@
|
|||
(fboundp 'evilmi-jump-items)
|
||||
'evilmi-jump-items)
|
||||
|
||||
;; Smarter RET in normal mode
|
||||
:n "RET" (general-predicate-dispatch nil
|
||||
(and (bound-and-true-p flyspell-mode)
|
||||
(+flyspell-correction-at-point-p))
|
||||
'flyspell-correct-word-generic)
|
||||
|
||||
;; Smarter newlines
|
||||
:i [remap newline] #'newline-and-indent ; auto-indent on newline
|
||||
:i "C-j" #'+default/newline ; default behavior
|
||||
|
@ -211,6 +205,7 @@
|
|||
:m "[S" #'flyspell-correct-previous-word-generic
|
||||
(:map flyspell-mouse-map
|
||||
"RET" #'flyspell-correct-word-generic
|
||||
[return] #'flyspell-correct-word-generic
|
||||
[mouse-1] #'flyspell-correct-word-generic))
|
||||
|
||||
(:when (featurep! :tools flycheck)
|
||||
|
@ -222,7 +217,8 @@
|
|||
:n "C-p" #'flycheck-error-list-previous-error
|
||||
:n "j" #'flycheck-error-list-next-error
|
||||
:n "k" #'flycheck-error-list-previous-error
|
||||
:n "RET" #'flycheck-error-list-goto-error))
|
||||
:n "RET" #'flycheck-error-list-goto-error
|
||||
:n [return] #'flycheck-error-list-goto-error))
|
||||
|
||||
(:when (featurep! :feature workspaces)
|
||||
:n "gt" #'+workspace/switch-right
|
||||
|
@ -271,6 +267,7 @@
|
|||
((featurep! :completion ivy) #'counsel-company))
|
||||
"C-SPC" #'company-complete-common
|
||||
"TAB" #'company-complete-common-or-cycle
|
||||
[tab] #'company-complete-common-or-cycle
|
||||
[backtab] #'company-select-previous)
|
||||
(:map company-search-map ; applies to `company-filter-map' too
|
||||
"C-n" #'company-select-next-or-abort
|
||||
|
@ -280,7 +277,9 @@
|
|||
"C-s" (λ! (company-search-abort) (company-filter-candidates))
|
||||
"ESC" #'company-search-abort)
|
||||
;; TAB auto-completion in term buffers
|
||||
:map comint-mode-map "TAB" #'company-complete))
|
||||
(:map comint-mode-map
|
||||
"TAB" #'company-complete
|
||||
[tab] #'company-complete)))
|
||||
|
||||
(:when (featurep! :completion ivy)
|
||||
(:map (help-mode-map helpful-mode-map)
|
||||
|
@ -320,6 +319,7 @@
|
|||
"C-b" #'backward-word
|
||||
;; Swap TAB and C-z
|
||||
"TAB" #'helm-execute-persistent-action
|
||||
[tab] #'helm-execute-persistent-action
|
||||
"C-z" #'helm-select-action)
|
||||
(:after swiper-helm
|
||||
:map swiper-helm-keymap [backtab] #'helm-ag-edit)
|
||||
|
@ -358,6 +358,8 @@
|
|||
:n "g" nil
|
||||
:n "TAB" #'neotree-quick-look
|
||||
:n "RET" #'neotree-enter
|
||||
:n [tab] #'neotree-quick-look
|
||||
:n [return] #'neotree-enter
|
||||
:n "DEL" #'evil-window-prev
|
||||
:n "c" #'neotree-create-node
|
||||
:n "r" #'neotree-rename-node
|
||||
|
@ -427,7 +429,8 @@
|
|||
(:map evil-multiedit-state-map
|
||||
"M-d" #'evil-multiedit-match-and-next
|
||||
"M-D" #'evil-multiedit-match-and-prev
|
||||
"RET" #'evil-multiedit-toggle-or-restrict-region)
|
||||
"RET" #'evil-multiedit-toggle-or-restrict-region
|
||||
[return] #'evil-multiedit-toggle-or-restrict-region)
|
||||
(:map (evil-multiedit-state-map evil-multiedit-insert-state-map)
|
||||
"C-n" #'evil-multiedit-next
|
||||
"C-p" #'evil-multiedit-prev)))
|
||||
|
@ -460,6 +463,7 @@
|
|||
:after gist
|
||||
:map gist-list-menu-mode-map
|
||||
:n "RET" #'+gist/open-current
|
||||
:n [return] #'+gist/open-current
|
||||
:n "b" #'gist-browse-current-url
|
||||
:n "c" #'gist-add-buffer
|
||||
:n "d" #'gist-kill-current
|
||||
|
|
|
@ -33,13 +33,6 @@
|
|||
;; This section is dedicated to "fixing" certain keys so that they behave
|
||||
;; sensibly (and consistently with similar contexts).
|
||||
|
||||
(defun +default|init-input-decode-map ()
|
||||
"Ensure TAB and [tab] are treated the same in TTY Emacs."
|
||||
(define-key input-decode-map [tab] (kbd "TAB"))
|
||||
(define-key input-decode-map [return] (kbd "RET"))
|
||||
(define-key input-decode-map [escape] (kbd "ESC")))
|
||||
(add-hook 'tty-setup-hook #'+default|init-input-decode-map)
|
||||
|
||||
;; Consistently use q to quit windows
|
||||
(after! tabulated-list
|
||||
(define-key tabulated-list-mode-map "q" #'quit-window))
|
||||
|
@ -76,8 +69,8 @@
|
|||
:g "s-/" (λ! (save-excursion (comment-line 1)))
|
||||
:n "s-/" #'evil-commentary-line
|
||||
:v "s-/" #'evil-commentary
|
||||
:gni "s-RET" #'+default/newline-below
|
||||
:gni "s-S-RET" #'+default/newline-above
|
||||
:gni [s-return] #'+default/newline-below
|
||||
:gni [S-s-return] #'+default/newline-above
|
||||
:gi [s-backspace] #'doom/backward-kill-to-bol-and-indent
|
||||
:gi [s-left] #'doom/backward-to-bol-or-indent
|
||||
:gi [s-right] #'doom/forward-to-last-non-comment-or-eol
|
||||
|
|
|
@ -386,7 +386,9 @@ between the two."
|
|||
:ni "C-S-k" #'org-metaup
|
||||
:ni "C-S-j" #'org-metadown
|
||||
;; more intuitive RET keybinds
|
||||
:i [return] #'org-return-indent
|
||||
:i "RET" #'org-return-indent
|
||||
:n [return] #'+org/dwim-at-point
|
||||
:n "RET" #'+org/dwim-at-point
|
||||
;; more vim-esque org motion keys (not covered by evil-org-mode)
|
||||
:m "]]" (λ! (org-forward-heading-same-level nil) (org-beginning-of-line))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue