Thursday, June 24, 2010

Re: Feature Request...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AK wrote:
> On 06/24/2010 08:59 AM, Jens-Wolfhard Schicke wrote:
>> Single character insert. Just like "r" will let you replace one
> character, I often need to insert a single character.
>> Currently I press "i<Whatever><ESC>", taking three strokes (one of them
> ESC or Ctrl-[, both of which involve some hand moving).
>>
>> With the single character insert, the most awkward of the three strokes
> would go away.
> It would be very easy to make a mapping for this, let @a = getch() and
> then "aP (untested).
>
> The issue is not adding a feature or a command but what key would be
> assigned to it. Vim already has all keys taken by more useful commands.
I disagree, and propose to use "_" for this feature. (Yes I know it'll break some scripts...)

"_" kind-a reminds one of the insert cursor some terminals do

"1_" (and "_") is nearly equivalent to "^" (and I suspect all non-equivalent cases can be handled with direct linewise commands)

"2_" is equivalent to "1+", (similar for "3_", "4_", "5_"...)

VIm got a single key command for removal of a character, a single key command for replace of a character,
it should also have a single key command for insertion of a character.

Observe yourself: How often do you "i<char><Esc>" compared to "_"?

Regards,
Jens
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwjcU0ACgkQzhchXT4RR5CZqQCdENp5mom3n02baQZGLmnDervr
ExcAn1pY9gR01N1vWmhAZPCZwIpMPKLB
=EXzU
-----END PGP SIGNATURE-----

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment