principalevim2gtkoutils

mainvim2gtktools

vim2gtk

Script de traduction d'une description de clavier VIM en méthode de saisie GTK
Script to translation a VIM keymap into a GTK Input Method

Comme indiqué dans le titre, vim2gtk.py est un petit script python permettant de traduire une description de clavier VIM en une méthode de saisie GTK, sous certaines conditions. En particulier, cette méthode ne fonctionne pas pour des séquences de touches trop longues (le code généré suppose que leur longueur maximale est 5 touches).

Ce script est aussi intéressant si vous voulez simplement créer une méthode de saisie à la main, étant donné que les descriptions de clavier VIM ont un format extrêmement simple : après une ligne contenant simplement loadkeymap, toutes les lignes sont de la forme :

]G Γ

]G indique la séquence à traduire et Γ le caractère résultant, les deux étant séparés par un espace ou une tabulation. Vous pouvez aussi jeter un œil à ma description de clavier, ou l'utiliser vous-même.

Ce script est diffusé sous deux formes : une archive contenant le programme et sa licence et un accès darcs (qui fournit une technique totalement idéale si vous souhaitez m'envoyer un correctif). Vous pouvez y accéder en faisant un :

darcs get --partial http://www.pps.jussieu.fr/~hym/d/vim2gtk/

Ce script est diffusé sous licence GPL.

clavier.vimvim2gtk.tar.gz

As stated in the title, vim2gtk.py is a small (python) script to translated a VIM keymap into a GTK Input Method, under certain constraints. In particular, this works only if every sequence of keys is of length 5 or less, because of the GTK functions invoked in the generated code.

This script might also be of some use if you simply want to write an Input Method by yourself, because the VIM keymap format is extremely straightforward: after a line simply containing loadkeymap, every other lines are of the form:

]G Γ

where ]G is the sequence of keys to be translated and Γ is the character we want to obtain, those two being separated by a space or a tabulation. You can take my keymap as an example to write yours.

You can get this script in two ways: you can download an archive containing the script itself and its licence or use darcs (which provides an ideal technique to send me a patch if you correct a bug). You can access the darcs repository by doing:

darcs get --partial http://www.pps.jussieu.fr/~hym/d/vim2gtk/

This script is under the GPL licence.

keymap.vimvim2gtk.tar.gz

Page modifiée pour la dernière fois le 19 juin 2005. xhtml, css