Emacs have a good automatic completion, the default is M- / can make a word that appears in the buffer. Add the following code to your. Permacs, you can make more things. Specific meaning can see the explanation in Emacswiki (Global-set-key "/ m-" 'hippie-expand) (Try-Complete-file-name-partially try-completion -file-name try-expand-all-abbrevs try-expand-load-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp- Symbol-Partially try-complete-lisp-symbol))