This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-09
Channels
- # announcements (16)
- # babashka (28)
- # beginners (27)
- # calva (39)
- # chlorine-clover (6)
- # cider (8)
- # clara (28)
- # cljs-dev (19)
- # cljsrn (22)
- # clojure (78)
- # clojure-australia (3)
- # clojure-europe (64)
- # clojure-nl (3)
- # clojure-norway (14)
- # clojure-spec (2)
- # clojure-uk (11)
- # clojurescript (11)
- # core-async (24)
- # datomic (3)
- # deps-new (5)
- # emacs (9)
- # fulcro (4)
- # gis (2)
- # graalvm (9)
- # honeysql (2)
- # hoplon (5)
- # instaparse (1)
- # introduce-yourself (5)
- # jobs (5)
- # luminus (4)
- # observability (7)
- # off-topic (6)
- # pathom (18)
- # pedestal (5)
- # polylith (4)
- # re-frame (2)
- # reagent (1)
- # reitit (1)
- # remote-jobs (7)
- # shadow-cljs (47)
- # specter (1)
- # sql (27)
- # testing (6)
- # tools-deps (4)
- # vim (3)
- # xtdb (8)
Hi, Does anyone know how can I get the backspace to skip pass just one char when using it with dired from top level directory to base directory? e.g.
Find file: ~/projects/some-project/sub-dir
# When I press Backspace at the sub-dir level I want it to go directly to
~/projects/some-project/ not by one char e.g.
~/projects/some-projec
In Spacemacs, it seems I can get the effect by pressing Ctl-h, but what I want is this to be the default behavior when pressing backspace.
You can use ^
to jump up. That said, one of the packages I have installed (ivy?) enables the mode you're asking about - pressing delete/backspace removes a single path segment not a single character
(defun tvaughan/parent-directory (path)
"Return the parent directory of PATH."
(or (file-name-directory (directory-file-name path)) ""))
(defun tvaughan/backward-delete-directory (arg)
"Delete characters backward until encountering the end of a word.
With ARG, do this that many times."
(interactive "p")
(let ((contents (minibuffer-contents)))
(delete-minibuffer-contents)
(insert (tvaughan/parent-directory contents))))
(use-package selectrum
:config
(selectrum-mode +1))
(define-key selectrum-minibuffer-map (kbd "DEL") #'tvaughan/backward-delete-directory)
ido does this much better. This still doesn't replicate it as well. Granted, this is used with selectrum, but should be adaptable
Is Ido basically a competitor for help or ivy?
Thanks @U01KUQRDMLG after adding ivy, and now I get the desired effect that I want.
I am trying a new config and can’t remember how this work with my old config. And ivy
package seems to be the one that I really need.