Vim has a plugin called SuperTab that uses the tab key to complete words in the current buffer (roughly speaking).
For example, if a buffer's contents are:
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
;; then enter the text in that file's own buffer.
Then typing eval
and then pressing tab will complete eval
to evaluation
, since the latter word is already in the buffer.
I am looking for a emacs equivalent. I know of hippie-expand
, but I do not quite like its behavior; sometimes, instead of completing just a word, it will try to complete an entire line.
Searching on the emacs-wiki, I found smart-tab, which almost does what I want. The only rub is that, in the example above, it will complete eval
to evaluation.
instead of evaluation
.
The question is the following:
- Is there a direct SuperTab equivalent for emacs that I haven't discovered?
- If not, is there a way to change smart-tab's behavior so that the extra period is not part of the completion?
M-x text-mode
in the scratch buffer and afterwards try tab again. – Tobias Jan 19 '16 at 17:38text-mode
solves the problem. Thanks! – Kevin Jan 19 '16 at 17:39