PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES
This commit is contained in:
parent
ef88d30b73
commit
5ae94b765c
79 changed files with 798 additions and 795 deletions
|
@ -68,52 +68,52 @@ module to be loaded."
|
|||
(defun +eshell/evil-append ()
|
||||
(interactive)
|
||||
(goto-char eshell-last-output-end)
|
||||
(call-interactively 'evil-append-line))
|
||||
(call-interactively #'evil-append-line))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-append-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(+eshell/evil-append)
|
||||
(call-interactively 'evil-append)))
|
||||
(call-interactively #'evil-append)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-prepend ()
|
||||
(interactive)
|
||||
(goto-char eshell-last-output-end)
|
||||
(call-interactively 'evil-insert))
|
||||
(call-interactively #'evil-insert))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-prepend-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(+eshell/evil-prepend)
|
||||
(call-interactively 'evil-insert)))
|
||||
(call-interactively #'evil-insert)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-replace-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(user-error "Cannot edit read-only region")
|
||||
(call-interactively 'evil-replace)))
|
||||
(call-interactively #'evil-replace)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-replace-state-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(user-error "Cannot edit read-only region")
|
||||
(call-interactively 'evil-replace-state)))
|
||||
(call-interactively #'evil-replace-state)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-change ()
|
||||
(interactive)
|
||||
(when (+eshell--outside-prompt-p)
|
||||
(goto-char eshell-last-output-end))
|
||||
(call-interactively 'evil-change))
|
||||
(call-interactively #'evil-change))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-change-line ()
|
||||
(interactive)
|
||||
(when (+eshell--outside-prompt-p)
|
||||
(goto-char eshell-last-output-end))
|
||||
(call-interactively 'evil-change-line))
|
||||
(call-interactively #'evil-change-line))
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
eshell-scroll-to-bottom-on-output 'all
|
||||
eshell-buffer-shorthand t
|
||||
;; em-prompt
|
||||
eshell-prompt-function '+eshell/prompt
|
||||
eshell-prompt-function #'+eshell/prompt
|
||||
;; em-glob
|
||||
eshell-glob-case-insensitive t
|
||||
eshell-error-if-no-glob t
|
||||
|
@ -32,23 +32,23 @@
|
|||
"Setup eshell keybindings. This must be done in a hook because eshell
|
||||
redefines its keys every time `eshell-mode' is enabled."
|
||||
(map! :map eshell-mode-map
|
||||
:n "i" '+eshell/evil-prepend-maybe
|
||||
:n "I" '+eshell/evil-prepend
|
||||
:n "a" '+eshell/evil-append-maybe
|
||||
:n "A" '+eshell/evil-append
|
||||
:n "r" '+eshell/evil-replace-maybe
|
||||
:n "R" '+eshell/evil-replace-state-maybe
|
||||
:n "c" '+eshell/evil-change
|
||||
:n "C" '+eshell/evil-change-line
|
||||
:i "<tab>" 'eshell-pcomplete
|
||||
:i "C-u" 'eshell-kill-input
|
||||
:i "SPC" 'self-insert-command
|
||||
:m "<return>" '+eshell/evil-append
|
||||
:n [remap evil-window-split] '+eshell/split
|
||||
:n [remap evil-window-vsplit] '+eshell/vsplit
|
||||
:n [remap evil-record-macro] 'eshell-life-is-too-much
|
||||
[remap doom/close-window-or-tab] 'eshell-life-is-too-much))
|
||||
(add-hook 'eshell-mode-hook '+eshell|keymap-setup)
|
||||
:n "i" #'+eshell/evil-prepend-maybe
|
||||
:n "I" #'+eshell/evil-prepend
|
||||
:n "a" #'+eshell/evil-append-maybe
|
||||
:n "A" #'+eshell/evil-append
|
||||
:n "r" #'+eshell/evil-replace-maybe
|
||||
:n "R" #'+eshell/evil-replace-state-maybe
|
||||
:n "c" #'+eshell/evil-change
|
||||
:n "C" #'+eshell/evil-change-line
|
||||
:i "<tab>" #'eshell-pcomplete
|
||||
:i "C-u" #'eshell-kill-input
|
||||
:i "SPC" #'self-insert-command
|
||||
:m "<return>" #'+eshell/evil-append
|
||||
:n [remap evil-window-split] #'+eshell/split
|
||||
:n [remap evil-window-vsplit] #'+eshell/vsplit
|
||||
:n [remap evil-record-macro] #'eshell-life-is-too-much
|
||||
[remap doom/close-window-or-tab] #'eshell-life-is-too-much))
|
||||
(add-hook 'eshell-mode-hook #'+eshell|keymap-setup)
|
||||
|
||||
(defun +eshell|cleanup ()
|
||||
"Close window (or workspace) on quit."
|
||||
|
@ -58,17 +58,17 @@ redefines its keys every time `eshell-mode' is enabled."
|
|||
((and (featurep! :feature workspaces)
|
||||
(string= "eshell" (+workspace-current-name)))
|
||||
(+workspace/close-window-or-workspace))))
|
||||
(add-hook 'eshell-exit-hook '+eshell|cleanup)
|
||||
(add-hook 'eshell-exit-hook #'+eshell|cleanup)
|
||||
|
||||
(defun +eshell|init ()
|
||||
"Keep track of eshell buffers."
|
||||
(add-to-list '+eshell-buffers (current-buffer)))
|
||||
(add-hook 'eshell-mode-hook '+eshell|init)
|
||||
(add-hook 'eshell-mode-hook #'+eshell|init)
|
||||
|
||||
(add-hook 'eshell-mode-hook 'doom-hide-modeline-mode)
|
||||
(add-hook 'eshell-mode-hook #'doom-hide-modeline-mode)
|
||||
|
||||
(add-hook! eshell-mode
|
||||
(add-hook 'evil-insert-state-exit-hook 'hl-line-mode nil t)
|
||||
(add-hook 'evil-insert-state-exit-hook #'hl-line-mode nil t)
|
||||
(add-hook 'evil-insert-state-entry-hook (lambda () (hl-line-mode -1)) nil t))
|
||||
|
||||
;; Aliases
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue