What happened?
I’m trying to get C-w
to function the same as DEL
when using vertico and find-file
.
What did you expect to happen?
If I’m on the last character of a directory, it should go up a directory as DEL
does.
Steps to reproduce
Steps from C-h l
view-lossage
:
SPC f f ;; find-file
C-w ;; doom/delete-backward-word
C-w ;; doom/delete-backward-word
C-w ;; doom/delete-backward-word
<up> ;; vertico-previous
` ;; self-insert-command
<backspace> ;; vertico-directory-delete-char
~ ;; self-insert-command
/ ;; self-insert-command
. ;; self-insert-command
d ;; self-insert-command
o ;; self-insert-command
o ;; self-insert-command
m ;; self-insert-command
<tab> ;; vertico-insert
<backspace> ;; vertico-directory-delete-char
<escape> ;; abort-recursive-edit
I’ve attempted the code inspired by a previous post:
(map! :after vertico
:map vertico-map
"C-w" #'vertico-directory-delete-char)