emacs - Disable opening directories with TAB in find-file
This commit is contained in:
parent
0355168a26
commit
992fcc1849
1 changed files with 7 additions and 1 deletions
|
@ -407,6 +407,11 @@
|
|||
"WIP: Tells evil-jump to save position before jumping via imenu (or counsel-imenu)"
|
||||
(evil--jumps-push))
|
||||
|
||||
;; Prevents opening directories in dired when pressing TAB
|
||||
(defun my/ivy-dont-tab-dir (orig &rest args)
|
||||
(when (> (length ivy-text) 0)
|
||||
(apply orig args)))
|
||||
|
||||
(use-package ivy
|
||||
:ensure t
|
||||
:demand t
|
||||
|
@ -417,7 +422,8 @@
|
|||
(setq ivy-count-format "(%d/%d) ")
|
||||
(advice-add 'imenu :before 'my/save-imenu-jump)
|
||||
(define-key ivy-minibuffer-map (kbd "<C-return>") 'ivy-immediate-done)
|
||||
(set-face-attribute 'ivy-current-match nil :foreground "gold"))
|
||||
(set-face-attribute 'ivy-current-match nil :foreground "gold")
|
||||
(advice-add 'ivy--directory-done :around #'my/ivy-dont-tab-dir))
|
||||
|
||||
(use-package counsel
|
||||
:ensure t
|
||||
|
|
Loading…
Reference in a new issue