I would like to use evil-complete-previous
(or whatever) to
complete strings_such_as_this
, which is by default not possible.
It is possible after (modify-syntax-entry ?_ "w")
, but this
has the undesired side-effect of rendering it impossible to jump
from the beginning of the string to the third s
with
(evil-forward-word-begin)
(w
). Can I get the effect without
the side-effect?
-
What about M-x dabbrev-expand RET ? – Andreas Röhler Jan 21 '20 at 7:02
-
@AndreasRöhler, it doesn't appear to behave differently. – Toothrot Jan 21 '20 at 12:44
Add a comment
|
I don't know if this is the best solution, but it works.
(defun evil*-complete-previous () (interactive)
(let ((old (string (char-syntax ?_))))
(modify-syntax-entry ?_ "w")
(evil-complete-previous)
(modify-syntax-entry ?_ old)))
(define-key evil-insert-state-map (kbd "M-p") 'evil*-complete-previous)