For example, I can open a bare vim (without plugin) and input some_long_object
and then hit Enter
to open a new line, and input a s
, hit C-x C-p
, it will complete some_long_object
for me. If I input some_long_object.some_method_really_long
on a new line, then I open a new line and input s
, then hit C-x C-p C-x C-p
, it will complete some_long_object.some_method_really_long
for me.
Vim can also do the same kind of thing on lines.(not only complete word, but also lines)
Out-of-box Emacs seems not doing word completion, line completion, and series completion as good as Vim. It only has an expand. when I use Vim, I can C-x C-p
to complete a word, (maybe it is a some_object
)and sequentially hit another C-x C-p
to complete it, hoping to check what should be following a some_object
, (for example it is a some_object.some_method
), and C-x C-l
will complete line or (use in sequence) lines for me.
So vim can complete one thing after another and I need not think about what should appear next if I am sure what should appear when I hit C-x C-p
.
And another thing, I can use C-x C-p
to recall what method I've used in this buffer but do not have to really finish the completion.
I heard of but have not used evil
before. Can evil do the same thing as I just said? and can I use evil
just for completion, not using its other kdbs? I've used to Emacs key bindings and have not used vim for at least 5 years.
I'm been using hippie-expand
for years. I don't like the way it does things because it does not give me any feedback how I can use it. It's like exploring on a website without UE designing. I even tried hippie-expand
with ido
menu. It's just not what I need. I'm not familiar with auto-complete
because when I tried it a few years ago, it was full of problems, and besides that its user experience was not as good as vim's completion. Vim's completion just provides me everything what I need and not any more or or any less.
So is there any Emacs extensions, or tweeks that can help me to do completion just like the way as I said?
I've been using Emacs for years. Emacs provides me many huge good things, but with this simple completion thing, I've tried again and again. Maybe the user experience philosophy behind Emacs is not so good as Vim.
For example, auto-complete
claims it has built a LOW COST operation philosophy behind it. But for me, the simple thing is it uses a input-userlookup-feedback-input-userlookup-feedback loop in its philosophy. It is slower than vim, because vim use a input->not_good?->simple_adjust philosophy. Behind vim it is real Unix philosophy, which is splitting complex things to simple parts. Try to lower the feedback cost and decrease feedback-loop is the central thing what vim provide us.
evil
is a vi-layer for emacs: emacswiki.org/emacs/Evil Maybe, you can try that one. – Tobias Oct 11 '16 at 7:04