keymap for Romanian?

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

keymap for Romanian?

Alexandru IANCU
Hi all,
is already a Romanian keymap file for VIM?
I needed to write some text in Romanian and I couldn't find such a keymap on my installed computer neither on the Inet.
If there isn't such a keymap file please add my file to your VIM sources.

Thanks,
Alexandru IANCU.
Reply | Threaded
Open this post in threaded view
|

Fwd: keymap for Romanian?

Alexandru IANCU
Hi, I posted the wrong files.
I realised later after I posted while testing. Sorry!
Regards,
Alexandru IANCU.

---------- Forwarded message ----------
From: Alexandru Iancu <[hidden email]>
Date: May 21, 2006 3:55 PM
Subject: keymap for Romanian?
To: [hidden email]

Hi all,
is already a Romanian keymap file for VIM?
I needed to write some text in Romanian and I couldn't find such a keymap on my installed computer neither on the Inet.
If there isn't such a keymap file please add my file to your VIM sources.

Thanks,
Alexandru IANCU.

Reply | Threaded
Open this post in threaded view
|

Re: Fwd: keymap for Romanian?

A.J.Mechelynck
Alexandru Iancu wrote:

> Hi, I posted the wrong files.
> I realised later after I posted while testing. Sorry!
> Regards,
> Alexandru IANCU.
>
> ---------- Forwarded message ----------
> From: *Alexandru Iancu* <[hidden email]
> <mailto:[hidden email]>>
> Date: May 21, 2006 3:55 PM
> Subject: keymap for Romanian?
> To: [hidden email] <mailto:[hidden email]>
>
> Hi all,
> is already a Romanian keymap file for VIM?
> I needed to write some text in Romanian and I couldn't find such a
> keymap on my installed computer neither on the Inet.
> If there isn't such a keymap file please add my file to your VIM sources.
>
> Thanks,
> Alexandru IANCU.
>
Maybe you could write one yourself? It shouldn't be very hard since
IIUC, Romanian uses the Latin alphabet. See ":help keymap-file-format"
about what a keymap must look like, and my
$VIMRUNTIME/keymap/esperanto_utf-8.vim, or Bram's
$VIMRUNTIME/keymap/accents.vim for examples of simple keymaps using
Latin letters with a few accented letters (in the case of Esperanto:
c-circumflex, g-circumflex, h-circumflex, j-circumflex, s-circumflex and
u-breve).

If and when you succeed in producing a working Romanian keymap, you can
then submit it to Bram for inclusion into the distribution for the next
Vim version.

If your keyboard can produce all the letters of Romanian, then you don't
need a keymap at all; you only need to make sure that 'encoding' is set
to a charset containing all the letters you need, and that the
'fileencoding' for the Romanian files you edit is either empty
(defaulting to the value of 'encoding') or setlocal'ed to a charset
which also includes all Romanian letters.

Oh, and if you mean you _already_ wrote one, then please make sure the
attachment doesn't get lost. I didn't get any "keymap file" with this
post, nor with your former one. In case vim-multibyte discards
attachments, maybe you could send it to [hidden email] and/or to
[hidden email] ? Or if your own firewall discards attachments on
outgoing mail, then send it "inline" (not as attachment) but then you
should make sure that the format doesn't get garbled (by added or
subtracted line breaks). Another possibility, if you can do it, is to
upload the file somewhere convenient on the Web and send its URL to the
list.


Best regards,
Tony.
Reply | Threaded
Open this post in threaded view
|

Re: keymap for Romanian?

Alexandru Pănoiu
In reply to this post by Alexandru IANCU
On 5/21/06, Alexandru Iancu <[hidden email]> wrote:

> Hi all,
> is already a Romanian keymap file for VIM?
> I needed to write some text in Romanian and I couldn't find such a keymap
> on my installed computer neither on the Inet.
> If there isn't such a keymap file please add my file to your VIM sources.
>
> Thanks,
>
> Alexandru IANCU.
>

I also use Vim to write Romanian. However, I don't use a keymap file,
because I prefer to keep my keyboard set to English (United States). Instead
of a keymap file I use a series of mappings with map <Alt-a>, <Alt-A>,
<Alt-\>, <Alt-|>, <Alt-i>, <Alt-I>, <Alt-s>, <Alt-S>, <Alt-t> and <Alt-T> to
aAaAiIsStT with the respective diacriticals. To keep the mapping independent
of encoding I have set up digraphs. Here's the relevant excerpt from my
vimrc file:

set winaltkeys=no                       " Don't use <Alt> for menu shortcuts
"
digraph uA      258                     " Latin A with breve
digraph ua      259                     " Latin a with breve
digraph ^A      194                     " Latin A with circumflex
digraph ^a      226                     " Latin a with circumflex
digraph ^I      206                     " Latin I with circumflex
digraph ^i      238                     " Latin i with circumflex
digraph ,S      350                     " Latin S with cedilla
digraph ,s      351                     " Latin s with cedilla
digraph ,T      354                     " Latin T with cedilla
digraph ,t      355                     " Latin t with cedilla
digraph `\"     8220                    " Double high-6 quotation mark
digraph '\"     8221                    " Double high-9 quotation mark
digraph ,\"     8222                    " Double low-9 quotation mark
digraph <<      171                     " Double left-pointing guillemot
digraph >>      187                     " Double right-pointing guillemot
"
noremap! <M-A>  <C-K>uA|                " Latin A with breve
noremap! <M-a>  <C-K>ua|                " Latin a with breve
noremap! <M-\|> <C-K>^A|                " Latin A with circumflexu
noremap! <M-\>  <C-K>^a|                " Latin a with circumflex
noremap! <M-I>  <C-K>^I|                " Latin I with circumflex
noremap! <M-i>  <C-K>^i|                " Latin i with circumflex
noremap! <M-S>  <C-K>,S|                " Latin S with cedilla
noremap! <M-s>  <C-K>,s|                " Latin s with cedilla
noremap! <M-T>  <C-K>,T|                " Latin T with cedilla
noremap! <M-t>  <C-K>,t|                " Latin t with cedilla
The digraphs are defined such that if the current encoding does not have the
relevant character then an ASCII approximation is inserted.

Best regards from Bucharest,
Alexandru Panoiu
Reply | Threaded
Open this post in threaded view
|

Re: keymap for Romanian?

A.J.Mechelynck
Alexandru Panoiu wrote:

> On 5/21/06, Alexandru Iancu <[hidden email]> wrote:
>
>> Hi all,
>> is already a Romanian keymap file for VIM?
>> I needed to write some text in Romanian and I couldn't find such a
>> keymap
>> on my installed computer neither on the Inet.
>> If there isn't such a keymap file please add my file to your VIM
>> sources.
>>
>> Thanks,
>>
>> Alexandru IANCU.
>>
>
> I also use Vim to write Romanian. However, I don't use a keymap file,
> because I prefer to keep my keyboard set to English (United States).
> Instead
> of a keymap file I use a series of mappings with map <Alt-a>, <Alt-A>,
> <Alt-\>, <Alt-|>, <Alt-i>, <Alt-I>, <Alt-s>, <Alt-S>, <Alt-t> and
> <Alt-T> to
> aAaAiIsStT with the respective diacriticals. To keep the mapping
> independent
> of encoding I have set up digraphs. Here's the relevant excerpt from my
> vimrc file:
>
> set winaltkeys=no                       " Don't use <Alt> for menu
> shortcuts
> "
> digraph uA      258                     " Latin A with breve
> digraph ua      259                     " Latin a with breve
> digraph ^A      194                     " Latin A with circumflex
> digraph ^a      226                     " Latin a with circumflex
> digraph ^I      206                     " Latin I with circumflex
> digraph ^i      238                     " Latin i with circumflex
> digraph ,S      350                     " Latin S with cedilla
> digraph ,s      351                     " Latin s with cedilla
> digraph ,T      354                     " Latin T with cedilla
> digraph ,t      355                     " Latin t with cedilla
> digraph `\"     8220                    " Double high-6 quotation mark
> digraph '\"     8221                    " Double high-9 quotation mark
> digraph ,\"     8222                    " Double low-9 quotation mark
> digraph <<      171                     " Double left-pointing guillemot
> digraph >>      187                     " Double right-pointing guillemot
> "
> noremap! <M-A>  <C-K>uA|                " Latin A with breve
> noremap! <M-a>  <C-K>ua|                " Latin a with breve
> noremap! <M-\|> <C-K>^A|                " Latin A with circumflexu
> noremap! <M-\>  <C-K>^a|                " Latin a with circumflex
> noremap! <M-I>  <C-K>^I|                " Latin I with circumflex
> noremap! <M-i>  <C-K>^i|                " Latin i with circumflex
> noremap! <M-S>  <C-K>,S|                " Latin S with cedilla
> noremap! <M-s>  <C-K>,s|                " Latin s with cedilla
> noremap! <M-T>  <C-K>,T|                " Latin T with cedilla
> noremap! <M-t>  <C-K>,t|                " Latin t with cedilla
> The digraphs are defined such that if the current encoding does not
> have the
> relevant character then an ASCII approximation is inserted.
>
> Best regards from Bucharest,
> Alexandru Panoiu
>
Note that there are already standard international digraphs for all
those letters (as defined in RFC1345):
- a( is a-breve, similarly for other letters with breve
- a> is circumflex, similarly for other letters with circumflex
- s, is s-cedilla, similarly for other letters with cedilla
- << and >> are standard, you don't need to define them
- 8220 to 8222 are "6 "9 and :9 respectively.

You can see them (as well as all other predefined digraphs) by typing
":digraphs" after setting 'encoding' to UTF-8 but before defining any
digraphs yourself.

See
    :help :digraphs
    :help digraphs-default


Best regards,
Tony.
Reply | Threaded
Open this post in threaded view
|

Re: keymap for Romanian?

Alexandru IANCU
Hi all,
 
because I needed only the 5 diacritics from Romanian I used a version of Alexandru Panoiu's method: I use shortcuts but I didn't defined again the Romanian digraphs because as Tony outlined they all are already defined. By the way Tony, I think Alexandru is somehow right when he defined them once again because one may not use the latest versions of vim or even not use vim but a flavour of it and this will guarantee it will work no matter what he/she will use.
Anyway I also made a very reduced version of Romanian keymap file for utf-8. It only defines the 5 diacritics. I'll not continue adding mappings to it so if there is someone kind and willing to complete that file is welcomed to do so. Thanks.
I sent this email also to the email addresses you told me(Tony) in the hope that this time the attached file will be received properly.
 
For the ones interested in the shortcuts method of typing Romanian diacritics see the previous emails of Alexandru Panoiu in this thread.
 
Best regards,
Alexandru IANCU.

 
On 5/23/06, A.J.Mechelynck <[hidden email]> wrote:
Alexandru Panoiu wrote:

> On 5/21/06, Alexandru Iancu <[hidden email]> wrote:
>
>> Hi all,
>> is already a Romanian keymap file for VIM?
>> I needed to write some text in Romanian and I couldn't find such a
>> keymap
>> on my installed computer neither on the Inet.
>> If there isn't such a keymap file please add my file to your VIM
>> sources.
>>
>> Thanks,
>>
>> Alexandru IANCU.
>>
>
> I also use Vim to write Romanian. However, I don't use a keymap file,
> because I prefer to keep my keyboard set to English (United States).
> Instead
> of a keymap file I use a series of mappings with map <Alt-a>, <Alt-A>,
> <Alt-\>, <Alt-|>, <Alt-i>, <Alt-I>, <Alt-s>, <Alt-S>, <Alt-t> and
> <Alt-T> to
> aAaAiIsStT with the respective diacriticals. To keep the mapping
> independent
> of encoding I have set up digraphs. Here's the relevant excerpt from my
> vimrc file:
>
> set winaltkeys=no                       " Don't use <Alt> for menu
> shortcuts
> "
> digraph uA      258                     " Latin A with breve
> digraph ua      259                     " Latin a with breve
> digraph ^A      194                     " Latin A with circumflex
> digraph ^a      226                     " Latin a with circumflex
> digraph ^I      206                     " Latin I with circumflex
> digraph ^i      238                     " Latin i with circumflex
> digraph ,S      350                     " Latin S with cedilla
> digraph ,s      351                     " Latin s with cedilla
> digraph ,T      354                     " Latin T with cedilla
> digraph ,t      355                     " Latin t with cedilla
> digraph `\"     8220                    " Double high-6 quotation mark
> digraph '\"     8221                    " Double high-9 quotation mark
> digraph ,\"     8222                    " Double low-9 quotation mark
> digraph <<      171                     " Double left-pointing guillemot
> digraph >>      187                     " Double right-pointing guillemot
> "
> noremap! <M-A>  <C-K>uA|                " Latin A with breve
> noremap! <M-a>  <C-K>ua|                " Latin a with breve
> noremap! <M-\|> <C-K>^A|                " Latin A with circumflexu
> noremap! <M-\>  <C-K>^a|                " Latin a with circumflex
> noremap! <M-I>  <C-K>^I|                " Latin I with circumflex
> noremap! <M-i>  <C-K>^i|                " Latin i with circumflex
> noremap! <M-S>  <C-K>,S|                " Latin S with cedilla
> noremap! <M-s>  <C-K>,s|                " Latin s with cedilla
> noremap! <M-T>  <C-K>,T|                " Latin T with cedilla
> noremap! <M-t>  <C-K>,t|                " Latin t with cedilla
> The digraphs are defined such that if the current encoding does not
> have the
> relevant character then an ASCII approximation is inserted.
>
> Best regards from Bucharest,
> Alexandru Panoiu
>
Note that there are already standard international digraphs for all
those letters (as defined in RFC1345):
- a( is a-breve, similarly for other letters with breve
- a> is circumflex, similarly for other letters with circumflex
- s, is s-cedilla, similarly for other letters with cedilla
- << and >> are standard, you don't need to define them
- 8220 to 8222 are "6 "9 and :9 respectively.

You can see them (as well as all other predefined digraphs) by typing
":digraphs" after setting 'encoding' to UTF-8 but before defining any
digraphs yourself.

See
   :help :digraphs
   :help digraphs-default


Best regards,
Tony.


romanian_utf-8.vim (1K) Download Attachment