William Turrell
William Turrell

Reputation: 3326

PhpStorm and IdeaVim - shortcut to complete line?

I'm using the current PHP Storm EAP (138.1505) and IdeaVim 0.35.

Suppose I just want to type:

print_r($foo);

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

Answers (2)

romainl
romainl

Reputation: 196476

You can add this line to ~/.ideavimrc:

imap <C-e> <Esc>A;<CR>

Replace <C-e> with your desired key.

Upvotes: 0

Kent
Kent

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

Related Questions