Emacs: Hippie Expand
- Alt+x
hippie-expand
- Expand current word to any matching string that occurs in existing buffers.
You need to give it a key. Example:
(global-set-key (kbd "C-t") 'hippie-expand)
[see Emacs: How to Define Keys]
Press once to expand. Press again to switch to next choice. Can be used anywhere, including in minibuffer.
Here's sample setup.
Put this in your emacs init file:
(setq hippie-expand-try-functions-list '( try-expand-dabbrev try-expand-dabbrev-all-buffers ;; try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol try-complete-file-name-partially try-complete-file-name ;; try-expand-all-abbrevs ;; try-expand-list ;; try-expand-line ))
If you have a question, put $5 at patreon and message me on xah discord.
Or support me by Buy Xah Emacs Tutorial