AX: change letters on the fly

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

AX: change letters on the fly

rameo
I often write messages in French, German or Italian.
I found a very nice little software AX to change letters on the fly
using only a hotkey (F8 or whatever else).
http://vulpeculox.net/ax/index.htm

It works in editors like notepad, notepad++ but not in gvim.
Is it because the keystrokes can't be trapped in vim?
Is there a solution?

Is it possible to do the same with a vim script?

Rameo

--
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Dominique Pellé
rameo wrote:

> I often write messages in French, German or Italian.
> I found a very nice little software AX to change letters on the fly
> using only a hotkey (F8 or whatever else).
> http://vulpeculox.net/ax/index.htm
>
> It works in editors like notepad, notepad++ but not in gvim.
> Is it because the keystrokes can't be trapped in vim?
> Is there a solution?
>
> Is it possible to do the same with a vim script?


I don't know why AX does not work with gvim.
However, if you need to type diacritics in French, German,
Italian (etc) and many other characters, you can do it
using Vim digraphs.

For example, typing in insert mode  <CTRL-k>'e  will
insert e acute é.  Other examples:

<CTRL-k>`e  → è
<CTRL-k>:e  → ë
<CTRL-k>,c  → ç
<CTRL-k><< → «
etc.

Ex command ":digraphs" shows available digraphs.
See more in ":help digraph".

Cheers
-- Dominique

--
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Nikolay Aleksandrovich Pavlov
In reply to this post by rameo
Reply to message «AX: change letters on the fly»,
sent 01:02:32 26 December 2010, Sunday
by rameo:

> I often write messages in French, German or Italian.
> I found a very nice little software AX to change letters on the fly
> using only a hotkey (F8 or whatever else).
> http://vulpeculox.net/ax/index.htm
>
> It works in editors like notepad, notepad++ but not in gvim.
> Is it because the keystrokes can't be trapped in vim?
> Is there a solution?
>
> Is it possible to do the same with a vim script?
>
> Rameo
I do not know, what AX exactly does, but changing letters on the fly is possible
with my translit3 plugin. It is written for russian language, so you will need
to create a transliteration table for german: install translit3, put the
transliteration table into /path/to/translit3/config/translit3/transsymb-it.json
and add the following to the vimrc:

    call load#Setoption('g:tr3Options', 'DefaultTranssymb', 'transsymb-it')

Then you should be able to start input transliteration mode by typing \ts in
normal mode. Example contents of transsymb-it.json:
===== transsymb-it.json =====
{"`": {"e": "è"},
 ":": {"e": "ë"},
 ",": {"c": "ç"},
 "<": {"<": "«"},
}
=============================
You may also do the following instead of fully manually creating
transsymb-it.json:

:e /path/to/translit3/config/translit3/transsymb-it.json
:call setline('.', '{}')
:w
:call load#Setoption('g:tr3Options', 'DefaultTranssymb', 'transsymb-it')
:Tr3Command add `e è
:Tr3Command add :e ë
:Tr3Command add ,c ç
:Tr3Command add << «

Input transliteration mode does not require you to instantly press `<C-k>', but
you may find inconvenient that by default you cannot add `@' and `%' characters
(first breaks transliteration sequence, so `:@e' will give you `:e', second
pauses transliteration, so `%:e:e%:e' will give you `:e:eë'). First can be
disabled via
    call load#Setoption('g:tr3Options', 'BrkSeq', '')
, second via
    call load#Setoption('g:tr3Options', 'StopTrSymbs', {})
(second percent sign in the example above is controlled by `StartTrSymbs'
option, but leaving it as-is does not hurt because transliteration cannot be
continued if it cannot be not paused).

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
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 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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
In reply to this post by Nikolay Aleksandrovich Pavlov
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 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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
In reply to this post by Nikolay Aleksandrovich Pavlov
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 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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
In reply to this post by Nikolay Aleksandrovich Pavlov
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 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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Chris Jones-44
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Nikolay Aleksandrovich Pavlov
In reply to this post by rameo
Reply to message «Re: AX: change letters on the fly»,
sent 10:39:02 26 December 2010, Sunday
by rameo:

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

This is possible with my plugin also, but only if you change «<F8>» to just
{some_key}: it is not intended to work with functional keys and I won't change
this. In this case transliteration sequences will change insignificantly:

:Tr3Command add a@ â
:Tr3Command add a@@ ä
:Tr3Command add a@@@ æ

and so on. You do not need to write an uppercase variant here: A@@@ will
automatically be transliterated to Æ (you may change this by explicitely
specifying transliteration sequence for A@@@, but in this case you will have to
explicitely specify sequences for A@ and A@@ or A@@@ will be the only sequence
starting with A). If you still want to use <F8>, you will need to write your own
plugin: I do not think that there are many people that prefer this variant as it
requires to move the whole arm, not just fingers what is incompatible with fast
touch-typing.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
On Dec 27, 5:07 pm, ZyX <[hidden email]> wrote:

> Reply to message «Re: AX: change letters on the fly»,
> sent 10:39:02 26 December 2010, Sunday
> by rameo:
>
> > 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.
>
> This is possible with my plugin also, but only if you change «<F8>» to just
> {some_key}: it is not intended to work with functional keys and I won't change
> this. In this case transliteration sequences will change insignificantly:
>
> :Tr3Command add a@ â
> :Tr3Command add a@@ ä
> :Tr3Command add a@@@ æ
>
> and so on. You do not need to write an uppercase variant here: A@@@ will
> automatically be transliterated to Æ (you may change this by explicitely
> specifying transliteration sequence for A@@@, but in this case you will have to
> explicitely specify sequences for A@ and A@@ or A@@@ will be the only sequence
> starting with A). If you still want to use <F8>, you will need to write your own
> plugin: I do not think that there are many people that prefer this variant as it
> requires to move the whole arm, not just fingers what is incompatible with fast
> touch-typing.
>
>  signature.asc
> < 1KViewDownload


Hello Zyx,

I have a russian keyb on my pc.
I use phonetic russian.
I started reading the translit3.txt document.
Most features are for transliteration in russian isn't it?

Kind regards,
Rameo

--
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
In reply to this post by Nikolay Aleksandrovich Pavlov
On Dec 27, 5:07 pm, ZyX <[hidden email]> wrote:

> Reply to message «Re: AX: change letters on the fly»,
> sent 10:39:02 26 December 2010, Sunday
> by rameo:
>
> > 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.
>
> This is possible with my plugin also, but only if you change «<F8>» to just
> {some_key}: it is not intended to work with functional keys and I won't change
> this. In this case transliteration sequences will change insignificantly:
>
> :Tr3Command add a@ â
> :Tr3Command add a@@ ä
> :Tr3Command add a@@@ æ
>
> and so on. You do not need to write an uppercase variant here: A@@@ will
> automatically be transliterated to Æ (you may change this by explicitely
> specifying transliteration sequence for A@@@, but in this case you will have to
> explicitely specify sequences for A@ and A@@ or A@@@ will be the only sequence
> starting with A). If you still want to use <F8>, you will need to write your own
> plugin: I do not think that there are many people that prefer this variant as it
> requires to move the whole arm, not just fingers what is incompatible with fast
> touch-typing.
>
>  signature.asc
> < 1KViewDownload


Hello Zyx,

I have a russian keyb on my pc.
I use phonetic russian.
I started reading the translit3.txt document.
Most features are for transliteration in russian isn't it?

Kind regards,
Rameo

--
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Nikolay Aleksandrovich Pavlov
Reply to message «Re: AX: change letters on the fly»,
sent 12:58:18 28 December 2010, Tuesday
by rameo:

> I have a russian keyb on my pc.
> I use phonetic russian.
> I started reading the translit3.txt document.
> Most features are for transliteration in russian isn't it?

Yes, the reason is explained in the first paragraph of intro located in
translit3.rux (I was to lazy to add this additional information to .txt because
there already were lots of information that cannot be omitted): I wrote it
because I do not want to learn touch-typing on two different keymaps: dvp and
ru. There is additional use-case: I use it to type math in LaTeX with russian
transliteration disabled.

By the way, why do I get lots of copies of all your messages? I heard that it
can be because you edit your messages in Google groups, but I do not see any
differencies between this message and its copy.

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

rameo
On Dec 28, 6:49 pm, ZyX <[hidden email]> wrote:
> By the way, why do I get lots of copies of all your messages? I heard that it
> can be because you edit your messages in Google groups, but I do not see any
> differencies between this message and its copy.
>


Yes I noted it also.
Maybe because after sending a message in google groups, I keep the
page in my browser to see the reactions.
When I refresh of the page it add a message at the bottom of the
thread.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: AX: change letters on the fly

Nikolay Aleksandrovich Pavlov
Reply to message «Re: AX: change letters on the fly»,
sent 11:35:23 29 December 2010, Wednesday
by rameo:

Looks like just another reason not to use google groups (others are «editing»
messages (it is not possible on mailing list), autowrap, unicode->ascii
translations, e-mail stripping, interface inconveniences).

By the way, if you will ever use Gentoo bugzilla, note that it also has this
«feature».

Original message:

> On Dec 28, 6:49 pm, ZyX <[hidden email]> wrote:
> > By the way, why do I get lots of copies of all your messages? I heard
> > that it can be because you edit your messages in Google groups, but I do
> > not see any differencies between this message and its copy.
>
> Yes I noted it also.
> Maybe because after sending a message in google groups, I keep the
> page in my browser to see the reactions.
> When I refresh of the page it add a message at the bottom of the
> thread.

signature.asc (205 bytes) Download Attachment