"In my experience Emacs simply isn't a very good terminal to run a shell in anyway"
Do you know about vterm
and eat
? If yes, what is the problem with these?
"In my experience Emacs simply isn't a very good terminal to run a shell in anyway"
Do you know about vterm
and eat
? If yes, what is the problem with these?
This has nothing to do with the diff program. Ediff is not able to highlight whitespace differences like it highlights non-whitespace differences. Maybe it is possible to do somehow, but by default, whitespace differences generate a diff region with no highlights (or as ediff calls it, refinements).
It is because highlights are done on word level, and whitespaces are not words.
Emacs has electric-indent-chars
. Whenever a character in this set is pressed, Emacs re-indents the current line. And as the indentation calculation is not perfect, it can happen that when you create a new line, its indentation calculated incorrectly, and during editing you press some electric-indent-char, which then re-indents the line.
For minibuffer completion, I created this, kind of works, but if there is an already developed, fully working solution, I'd rather use that. And I'm still interested in for a solution to use in a normal buffer that corfu
could use.
(defun my-consult-fd-string (&optional dir initial)
(interactive "P")
(setq this-command 'consult-fd)
(pcase-let* ((`(,prompt ,paths ,dir) (consult--directory-prompt "Fd" dir))
(default-directory dir)
(builder (consult--fd-make-builder paths)))
(concat dir (consult--find prompt builder initial))))
(defun my-consult-insert-fd-string ()
(interactive)
(insert
(abbreviate-file-name
(let ((f (bounds-of-thing-at-point 'filename)))
(if f
(let ((r (my-consult-fd-string (buffer-substring-no-properties (car f) (cdr f)) nil)))
(delete-region (car f) (cdr f))
r)
(my-consult-fd-string t nil))))))
(define-key minibuffer-local-map (kbd "M-f") 'my-consult-insert-fd-string)
I simply use:
I use it manually, but I don't care too much because I don't edit my init files too often anymore. But it shouldn't be too hard to run this function automatically at boot if the
.elc
is outdated compared to the.el
.