Reputation: 3326
I'm using the current PHP Storm EAP (138.1505) and IdeaVim 0.35.
Suppose I just want to type:
print_r($foo);
i
to go into Vim insert mode.p
r
and I can choose print_r
via the autocomplete.()
for me.print_r($foo)
with my cursor positioned before the closing bracket.What I'd like now is a single key combination that'll finish the line for me - i.e. add a semi-colon and a carriage return. At the moment I either have to type );[return]
by hand as if the autocomplete wasn't there, or for some reason I've got in the habit of doing esc
to leave insert mode then A
to continue at the end of the line and ;[return][esc]
to finish it off, which is even longer.
Any better way?
Upvotes: 0
Views: 867
Reputation: 196476
You can add this line to ~/.ideavimrc
:
imap <C-e> <Esc>A;<CR>
Replace <C-e>
with your desired key.
Upvotes: 0
Reputation: 195029
I don't use PHP Storm. but I do use Intellij + ideavim.
Here I can press Ctrl-Shift-Enter
to complete a line. It is a kind of default setting. You can find it under menu: Edit: complete current statement
You may want to give it a try.
Upvotes: 3