Definite's Extractor

My findings on Life, Linux, Open Source, and so on.

Nasty behavior of Vim

As Vim FAQ Section 10.2 shows, whenever <Esc> is pressed, the Vim cursor will moves one character to the left, and there is no way to change the behaviour.

The FAQ suggests that we can use Ctrl-O to enter the command mode temporally, after command entered, the cursor will back to it should be. However, it doesn’t help me.

I’d written a smart paste script for Vim
(see for details).
It works well except one bug: when pasting between col 1 and col 2 in insert mode, the pasteded text will appear in the beginning of line, what the..

The cause is simple: col 1 and col 2 are both mapped to col 1 after leaving insert mode. They are undistinguishable in normal, unfortunately, function cannot be called in inserted mode. Ctrl-O cannot help us because it will do the same when the function is performed.

Still ponding about solution.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: