(after! tempel
(use-package! tempel
:bind (("M-y" . tempel-complete)
:map tempel-map
("M-j" . tempel-next)
("M-k" . tempel-previous)
("TAB" . tempel-next)
("S-TAB" . tempel-previous))
:init
;; Setup completion at point
(defun tempel-setup-capf ()
;; Add the Tempel Capf to `completion-at-point-functions'.
;; `tempel-expand' only triggers on exact matches. Alternatively use
;; `tempel-complete' if you want to see all matches, but then you
;; should also configure `tempel-trigger-prefix', such that Tempel
;; does not trigger too often when you don't expect it. NOTE: We add
;; `tempel-expand' *before* the main programming mode Capf, such
;; that it will be tried first.
(setq-local completion-at-point-functions
(cons #'tempel-complete
completion-at-point-functions)))
(add-hook 'conf-mode-hook 'tempel-setup-capf)
(add-hook 'prog-mode-hook 'tempel-setup-capf)
(add-hook 'text-mode-hook 'tempel-setup-capf)))
;; Defined in /opt/homebrew/Cellar/emacs-plus@30/30.0.91/share/emacs/30.0.91/lisp/indent.el
(defun indent-for-tab-command (&optional arg)
"Indent the current line or region, or insert a tab, as appropriate.
This function either inserts a tab, or indents the current line,
or performs symbol completion, depending on `tab-always-indent'.
The function called to actually indent the line or insert a tab
is given by the variable `indent-line-function'.
If a prefix argument is given (ARG), after this function indents the
current line or inserts a tab, it also rigidly indents the entire
balanced expression which starts at the beginning of the current
line, to reflect the current line's indentation.
In most major modes, if point was in the current line's
indentation, it is moved to the first non-whitespace character
after indenting; otherwise it stays at the same position relative
to the text.
If `transient-mark-mode' is turned on and the region is active,
this function instead calls `indent-region'. In this case, any
prefix argument is ignored."
Functions called by indent-for-tab-command:
completion-at-point
forward-sexp
indent--default-inside-comment
indent--funcall-widened
indent-region
indent-rigidly
insert-tab
syntax-after
syntax-class
use-region-p
Primitives called by indent-for-tab-command:
-
<
<=
>
buffer-chars-modified-tick
current-column
current-indentation
default-value
eolp
eq
eql
forward-line
memq
not
point
point-marker
region-beginning
region-end
save-excursion
<tab> runs the command indent-for-tab-command (found in evil-insert-state-map),
which is an interactive native-compiled Lisp function in ‘indent.el’.
It is bound to TAB.
(indent-for-tab-command &optional ARG)
(after! tempel
(use-package! tempel
:bind (:map tempel-map
("M-j" . tempel-next)
("M-k" . tempel-previous)
("<tab>" . tempel-next)
("TAB" . tempel-next)
("<backtab>" . tempel-previous))
:init
;; Setup completion at point
(defun tempel-setup-capf ()
;; Add the Tempel Capf to `completion-at-point-functions'.
;; `tempel-expand' only triggers on exact matches. Alternatively use
;; `tempel-complete' if you want to see all matches, but then you
;; should also configure `tempel-trigger-prefix', such that Tempel
;; does not trigger too often when you don't expect it. NOTE: We add
;; `tempel-expand' *before* the main programming mode Capf, such
;; that it will be tried first.
(setq-local completion-at-point-functions
(cons #'tempel-complete
completion-at-point-functions)))
(add-hook 'conf-mode-hook 'tempel-setup-capf)
(add-hook 'prog-mode-hook 'tempel-setup-capf)
(add-hook 'text-mode-hook 'tempel-setup-capf)))
<tab> runs the command indent-for-tab-command (found in evil-insert-state-map),
which is an interactive native-compiled Lisp function in ‘indent.el’.
(indent-for-tab-command &optional ARG)
Persp minor mode (indicator #ngcft):
Toggle the persp-mode.
When active, keeps track of multiple 'perspectives',
named collections of buffers and window configurations.
Here is a keymap of this minor mode:
Key Binding
C-x 0 +workspace/close-window-or-workspace
(Remapped via <remap> <delete-window>)
C-x 0 +workspace/close-window-or-workspace
(Remapped via <remap> <evil-window-delete>)
C-c p C persp-kill
C-c p I persp-import-win-conf
C-c p K persp-kill-buffer
C-c p L persp-load-from-file-by-names
C-c p S persp-window-switch
C-c p W persp-save-to-file-by-names
C-c p a persp-add-buffer
C-c p b persp-switch-to-buffer
C-c p c persp-copy
C-c p i persp-import-buffers
C-c p k persp-remove-buffer
C-c p l persp-load-state-from-file
C-c p n persp-next
C-c p o [byte-code]
C-c p p persp-prev
C-c p r persp-rename
C-c p s persp-frame-switch
C-c p t persp-temporarily-display-buffer
C-c p w persp-save-state-to-file
C-c p z persp-save-and-kill