Prepare a line in vi

I just want to do the opposite Ain vi - so when I Aput you in insert mode and bring you to the end of the current line, I'm looking to switch to insert mode at the beginning of the current line.

So, is there an equivalent:

0
i

in one keystroke?

I am sure that this must have been asked before, but any search I do (here or Google) only returns results for more complex tasks.

It seems that this should be possible in such a powerful tool, but cannot find it on cheats, etc. for vi.

+4
source share
2 answers

There seems to be no such alternative by default.

In addition 0i, you can also enter gI.

, , ,

:map X gI

X - .

, , . .vimrc, ​​ .

+1

g I

. 0 I

I

. ^ I

0

All Articles