Sunday, December 26, 2010

Re: AX: change letters on the fly

On Sun, Dec 26, 2010 at 02:39:02AM EST, rameo wrote:
> Zyx, Dominique,
>
> I know the ctrl-k feature.
>
> I also use "Texter" on my pc to send advanced keystrokes to a program
> p.e. \\e" --> transforms in "ë" on my pc
>
> I also have a number of blind keys on my keyboard to create foreign
> letters p.e. AltGR"e creates an "ë"
>
> However AX is much quicker.
> I created this key sequence in AX:
> aâäæa AÀÂÄÆA bßb BßB CÇC eêëe EÉÊÈËE iîïi IÎÏI oôöœo OÔÖŒO uûüu UÛÙÜU
>
> when I write the letter "a" and push F8, the "a" becomes an "â" when i
> push F8 again the "â" becomes an "ä", so on.
> It cut out the character to the left of the cursor, it look it up in a
> string of characters and paste the next one.
> Unfortunately, it doesn't work in gvim.
> It works writing this text, it works in other editors but not in my
> default editor gvim. :)

You might be interested in the 'Unicycle.vim' plugin by Jason Diamond.

You could modify it to do pretty much what you need without having to
reach for a hot key and end up with something that works pretty much
along the lines of the T9 mode of your cell phone. Take it from someone
who has next to no Vimscript skills, I once customized this plugin to
add stuff like fancy arrows, bullets, etc. to the original, and it
shouldn't take you more than a couple of hours.

Otherwise, what with Vim's lists and dictionaries, writing a function
that overwrites the character before the cursor by the next character in
a given sequence shouldn't be too hard.

In the long run, probably less of a headache than trying to adapt
someone else's code to Vim.

cj

--
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