Other European languages on a US keyboard

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

Other European languages on a US keyboard

cga2000
I sometimes need to write text in other languages such as French,
Spanish and occasionally German or Italian.

I would like to do this in Vim.

Unfortunately I only have a US keyboard.

Using Ctrl-K to enter the various digraphs becomes somewhat cumbersome
for anything larger than a short paragraph.

Unfortunately I am only able to type the US keyboard, so remapping the
keyboard might be a better solution than entering digraphs in the long
run but will not be painless..  And since I do not do this on a regular
basis, I am unsure whether it's really worth going to all the trouble.

I was thinking of writing the text without accents, tildes, cedillas,
etc. using the letters on the US keyboard and then feeding the result to
some advanced functionality of a spellchecker that would replace all the
words that can only be spelled one way by their correctly spelled
version - say French 'épeler" (to spell) can only be spelled this way..
there is  no 'epeler' or 'èpeler' or 'êpeler'.

On the other hand, for those words where the accent differs depending
on the semantics such as French 'a' vs. 'à', the script/plugin would
leave them untouched and  - ideally - highlight them, thus leaving me
with only a handful of manual corrections.

Is there anything in Vim that does something like this?

Or is there any other 'smart' way to achieve something like the above?

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

RE: Other European languages on a US keyboard

Gene Kwiecinski
>Unfortunately I am only able to type the US keyboard, so remapping the
>keyboard might be a better solution than entering digraphs in the long
>run but will not be painless..  And since I do not do this on a regular
>basis, I am unsure whether it's really worth going to all the trouble.

Would it be impractical to map, eg, <^><e> to whatever the code is for 'ê', ie, use prefix notation of [^'`~,], etc., as a prefix for [aeioucnAEIOUCN] as needed?
Wouldn't be *all* those combinations, but, eg, would only need <,><C> for &Ccedil;, <~><N> for &Ntilde; (and their lowercase counterparts, natch), but the rest would just be whatever accented chars you normally use, for grave, acute, circumflex, etc.

I'm not sure how a non-US keyboard does such things, so I can't suggest a more "transparent" way of doing it.

One other possibility would be the way my phone does multiple chars per key, eg, you'd hit '1' to get the generic '.', then '*' would cycle through different punctuation, and so on, 'til it'd get back to '.' again.  Maybe hitting alt-A would get you an 'a' and put you into a loop, then multiple hits of an F-key would cycle through the 3-4 other chars and then back.  Any other key would "escape" the loop.  Arrange them in the order you expect their occurrence, most commonly-used ones first.

Eg, if you arrange them in the order acute/grave/circumflex/ring, simply hitting <M-a> would get you &aacute;.  Hit F2, and it gets you &agrave;.  Hit F2 again, circumflex.  Again, ring.  Again, acute.  Lather, rinse, repeat.

*Implementing* this would for now be beyond my ken, or my barbie, but I'm sure someone might have some ideas how to best do it.  No?
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
In reply to this post by cga2000
cga2000 wrote:

> I sometimes need to write text in other languages such as French,
> Spanish and occasionally German or Italian.
>
> I would like to do this in Vim.
>
> Unfortunately I only have a US keyboard.
>
> Using Ctrl-K to enter the various digraphs becomes somewhat cumbersome
> for anything larger than a short paragraph.
>
> Unfortunately I am only able to type the US keyboard, so remapping the
> keyboard might be a better solution than entering digraphs in the long
> run but will not be painless..  And since I do not do this on a regular
> basis, I am unsure whether it's really worth going to all the trouble.
>
> I was thinking of writing the text without accents, tildes, cedillas,
> etc. using the letters on the US keyboard and then feeding the result to
> some advanced functionality of a spellchecker that would replace all the
> words that can only be spelled one way by their correctly spelled
> version - say French 'épeler" (to spell) can only be spelled this way..
> there is  no 'epeler' or 'èpeler' or 'êpeler'.
>
> On the other hand, for those words where the accent differs depending
> on the semantics such as French 'a' vs. 'à', the script/plugin would
> leave them untouched and  - ideally - highlight them, thus leaving me
> with only a handful of manual corrections.
>
> Is there anything in Vim that does something like this?
>
> Or is there any other 'smart' way to achieve something like the above?
>
> Thanks
>
> cga
>
>

I.

Since you've already used digraphs, and they're too cumbersome for you,
you could try a keymap.

There are some keymaps in $VIMRUNTIME/keymap which you can apply by just
doing ":setlocal keymap=<keymapname>" (where <keymapname> is the
filename without the encoding and .vim endings) or by using the "Edit ->
Keymap" menu. Then you can toggle between "US-QWERTY" mode and "keymap"
mode by hitting Ctrl-^ in Insert mode, or by toggling 'iminsert' between
zero and 1 in any mode. Basically, what a keymap does is establish a set
of language-mappings, i.e., insert-mode mappings which can be turned on
an off. Try the "accents" keymap, it might be just what you want.

Or, if none of the distributed keymaps is exactly what you want, you can
write your own. It isn't hard. See ":help :loadkeymap" for the theory,
and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my
$VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples.
You might want to write something more extensive but this will show you
how to do it.

If and when you write your own keymap, place it in the keymap/
subdirectory of a directory listed early in 'runtimepath' but not in
$VIMRUNTIME/keymap itself because any upgrade can silently change
anything there.



II. What you are suggesting looks like setting 'spelllang' (with three
ells) to whatever means "French" and then spellchecking your
US-ASCII-only text. But beware: the Vim spellchecker (which I don't use
because of my good innate spelling) might not be clever enough to mark
words which have accented homographs, such as "a" ("has") vs. "à"
("at"), "de" ("of") vs. "dé" ("thimble"), "du" ("of the") vs. "dû"
("owed"), "cru" ("believed" or "raw") vs. "crû" ("grown") etc.: so the
cure might be worse than the ill, owing to the necessity of looking for
unmarked spelling mistakes even after running the spell checker.


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

Re: Other European languages on a US keyboard

iler.ml
In reply to this post by cga2000
On 7/21/06, cga2000 <[hidden email]> wrote:

> I sometimes need to write text in other languages such as French,
> Spanish and occasionally German or Italian.
>
> I would like to do this in Vim.
>
> Unfortunately I only have a US keyboard.
>
> Using Ctrl-K to enter the various digraphs becomes somewhat cumbersome
> for anything larger than a short paragraph.
>
> Unfortunately I am only able to type the US keyboard, so remapping the
> keyboard might be a better solution than entering digraphs in the long
> run but will not be painless..  And since I do not do this on a regular
> basis, I am unsure whether it's really worth going to all the trouble.
>
> I was thinking of writing the text without accents, tildes, cedillas,
> etc. using the letters on the US keyboard and then feeding the result to
> some advanced functionality of a spellchecker that would replace all the
> words that can only be spelled one way by their correctly spelled
> version - say French 'épeler" (to spell) can only be spelled this way..
> there is  no 'epeler' or 'èpeler' or 'êpeler'.
>
> On the other hand, for those words where the accent differs depending
> on the semantics such as French 'a' vs. 'à', the script/plugin would
> leave them untouched and  - ideally - highlight them, thus leaving me
> with only a handful of manual corrections.
>
> Is there anything in Vim that does something like this?
>
> Or is there any other 'smart' way to achieve something like the above?

I think the easiest apporach is to craete mappings.
You could use ctrl-(a-z), ctrl-shift(a-z), ctrl-alt-(a-z),
then f1-f12 + ctrl/alt/del combinations.

Linux has a keyboard mode where ' is used to
modify letters to create diactitics. This works for
all X applications, not just vim.

Yakov
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

cga2000
In reply to this post by A.J.Mechelynck
On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
> cga2000 wrote:
> >I sometimes need to write text in other languages such as French,
> >Spanish and occasionally German or Italian.
> >
> >I would like to do this in Vim.
> >
> >Unfortunately I only have a US keyboard.
> >
[..]

> I.
>
> Since you've already used digraphs, and they're too cumbersome for you,
> you could try a keymap.
>
> There are some keymaps in $VIMRUNTIME/keymap which you can apply by just
> doing ":setlocal keymap=<keymapname>" (where <keymapname> is the
> filename without the encoding and .vim endings) or by using the "Edit ->
> Keymap" menu. Then you can toggle between "US-QWERTY" mode and "keymap"
> mode by hitting Ctrl-^ in Insert mode, or by toggling 'iminsert' between
> zero and 1 in any mode. Basically, what a keymap does is establish a set
> of language-mappings, i.e., insert-mode mappings which can be turned on
> an off. Try the "accents" keymap, it might be just what you want.
>
This works great..! I tried that on a short text in French and within a
couple of minutes I was almost as comfortable as I am when typing in
English.  The accents are all perfectly intuitive - ` ' ^ etc. so I
didn't even need to look at the keymap.  Just need to be a little
patient when entering an apostrophe.

Only minor glitch seems to be that text doesn't wrap when in "INSERT
(lang)" mode.. haven't figured out why yet.. so I just escape out of
insert mode and do a "gqip" once in a while.  Could be unrelated
though..
       
> Or, if none of the distributed keymaps is exactly what you want, you can
> write your own. It isn't hard. See ":help :loadkeymap" for the theory,
> and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my
> $VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples.
> You might want to write something more extensive but this will show you
> how to do it.
>
Doesn't look like much is missing.. Maybe the French o+e .. but then my
screen font doesn't have it either..

> If and when you write your own keymap, place it in the keymap/
> subdirectory of a directory listed early in 'runtimepath' but not in
> $VIMRUNTIME/keymap itself because any upgrade can silently change
> anything there.
>
>
>
> II. What you are suggesting looks like setting 'spelllang' (with three
> ells) to whatever means "French" and then spellchecking your
> US-ASCII-only text. But beware: the Vim spellchecker (which I don't
> use because of my good innate spelling) might not be clever enough to
> mark words which have accented homographs, such as "a" ("has") vs. "à"
> ("at"), "de" ("of") vs. "dé" ("thimble"), "du" ("of the") vs. "dû"
> ("owed"), "cru" ("believed" or "raw") vs. "crû" ("grown") etc.: so the
> cure might be worse than the ill, owing to the necessity of looking
> for unmarked spelling mistakes even after running the spell checker.
>
I think you're right.  Considering how effective the keymap solution is
there's just no point.  Anyway, I don't even have an active spellchecker
at this point. aspell segfaults for some reason and I haven't had time
to research that yet.

Just need to figure out how I can get latex to handle these non-ASCII
characters. They disappear from the .dvi file.

In case I can't figure it out, there's probably a latex user list
somewhere.

Great Tip..!

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

cga2000
In reply to this post by iler.ml
On Fri, Jul 21, 2006 at 05:19:33PM EDT, Yakov Lerner wrote:
> On 7/21/06, cga2000 <[hidden email]> wrote:
[..]
>
> I think the easiest apporach is to craete mappings.
> You could use ctrl-(a-z), ctrl-shift(a-z), ctrl-alt-(a-z),
> then f1-f12 + ctrl/alt/del combinations.
>
Thanks, but not for me.. I touch type and as a result Tony's solution
is much preferable than key combos.

> Linux has a keyboard mode where ' is used to
> modify letters to create diactitics. This works for
> all X applications, not just vim.

I have used the Compose key in the past - usually mapped to menu.. I
think I remapped it to the Windows key on this laptop at one point but
I wasn't aware of this X keyboard mode.

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

cga2000
In reply to this post by Gene Kwiecinski
On Fri, Jul 21, 2006 at 02:50:46PM EDT, Gene Kwiecinski wrote:

> >Unfortunately I am only able to type the US keyboard, so remapping
> >the keyboard might be a better solution than entering digraphs in the
> >long run but will not be painless..  And since I do not do this on a
> >regular basis, I am unsure whether it's really worth going to all the
> >trouble.
>
> Would it be impractical to map, eg, <^><e> to whatever the code is for
> 'ê', ie, use prefix notation of [^'`~,], etc., as a prefix for
> [aeioucnAEIOUCN] as needed?  Wouldn't be *all* those combinations,
> but, eg, would only need <,><C> for &Ccedil;, <~><N> for &Ntilde; (and
> their lowercase counterparts, natch), but the rest would just be
> whatever accented chars you normally use, for grave, acute,
> circumflex, etc.
>
Unless I'm mistaken you have actually reinvented the loadkeymap solution
discussed by Tony..?  

Don't take me wrong.. I am *not* being ironical..  

Quite the contrary.
       

> I'm not sure how a non-US keyboard does such things, so I can't
> suggest a more "transparent" way of doing it.
>
> One other possibility would be the way my phone does multiple chars
> per key, eg, you'd hit '1' to get the generic '.', then '*' would
> cycle through different punctuation, and so on, 'til it'd get back to
> '.' again.  Maybe hitting alt-A would get you an 'a' and put you into
> a loop, then multiple hits of an F-key would cycle through the 3-4
> other chars and then back.  Any other key would "escape" the loop.
> Arrange them in the order you expect their occurrence, most
> commonly-used ones first.
>
That, I had thought of but I discarded it as impractical.  That's also
the method that's commonly used to input languages that have too many
characters to fit on a reasonably-sized keyboard.. Chinese, eg.

Entering the accent, tilde, cedilla.. etc. followed by the letter is a
lot more in keeping with the wiring of my cortex..

> Eg, if you arrange them in the order acute/grave/circumflex/ring,
> simply hitting <M-a> would get you &aacute;.  Hit F2, and it gets you
> &agrave;.  Hit F2 again, circumflex.  Again, ring.  Again, acute.
> Lather, rinse, repeat.
>
> *Implementing* this would for now be beyond my ken, or my barbie, but
> I'm sure someone might have some ideas how to best do it.  No?

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
In reply to this post by cga2000
cga2000 wrote:
> On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
[...]
> Only minor glitch seems to be that text doesn't wrap when in "INSERT
> (lang)" mode.. haven't figured out why yet.. so I just escape out of
> insert mode and do a "gqip" once in a while.  Could be unrelated
> though..

Check your options:

        " for auto-insert of linebreaks
        :verbose set textmode? wrapmargin?
        :verbose set formatoptions? formatexpr?

        " about display of long lines
        :verbose set wrap? linebreak? breakat?

>
>> Or, if none of the distributed keymaps is exactly what you want, you can
>> write your own. It isn't hard. See ":help :loadkeymap" for the theory,
>> and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my
>> $VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples.
>> You might want to write something more extensive but this will show you
>> how to do it.
>>
> Doesn't look like much is missing.. Maybe the French o+e .. but then my
> screen font doesn't have it either..

The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding,
neither in capitals (as for titles or if the word "oeuf" [egg] is the
first of a sentence), nor in lowercase. You need UTF-8 for it, and for
this relatively rare character you can still use Ctrl-K o e ; or else
you can add the following to your vimrc (after setting 'encoding' to UTF-8):

        lmap OE <Char-338>
        lmap oe <Char-339>

I'm using "language mappings" here so they will be turned on and off
together with the keymap.

>
>> If and when you write your own keymap, place it in the keymap/
>> subdirectory of a directory listed early in 'runtimepath' but not in
>> $VIMRUNTIME/keymap itself because any upgrade can silently change
>> anything there.
>>
>>
>>
>> II. What you are suggesting looks like setting 'spelllang' (with three
>> ells) to whatever means "French" and then spellchecking your
>> US-ASCII-only text. But beware: the Vim spellchecker (which I don't
>> use because of my good innate spelling) might not be clever enough to
>> mark words which have accented homographs, such as "a" ("has") vs. "à"
>> ("at"), "de" ("of") vs. "dé" ("thimble"), "du" ("of the") vs. "dû"
>> ("owed"), "cru" ("believed" or "raw") vs. "crû" ("grown") etc.: so the
>> cure might be worse than the ill, owing to the necessity of looking
>> for unmarked spelling mistakes even after running the spell checker.
>>
> I think you're right.  Considering how effective the keymap solution is
> there's just no point.  Anyway, I don't even have an active spellchecker
> at this point. aspell segfaults for some reason and I haven't had time
> to research that yet.

Vim 7 has a built-in spell checker. I don't use it, but I know it is
there. I guess ":helpgrep spell" might tell you about it if you're
interested.

>
> Just need to figure out how I can get latex to handle these non-ASCII
> characters. They disappear from the .dvi file.
>
> In case I can't figure it out, there's probably a latex user list
> somewhere.
>
> Great Tip..!
>
> Thanks
>
> cga
>
>

My pleasure.

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

Re: Other European languages on a US keyboard

cga2000
On Sat, Jul 22, 2006 at 04:40:45PM EDT, A.J.Mechelynck wrote:

> cga2000 wrote:
> >On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
> [...]
> >Only minor glitch seems to be that text doesn't wrap when in "INSERT
> >(lang)" mode.. haven't figured out why yet.. so I just escape out of
> >insert mode and do a "gqip" once in a while.  Could be unrelated
> >though..
>
> Check your options:
>
> " for auto-insert of linebreaks
> :verbose set textmode? wrapmargin?
> :verbose set formatoptions? formatexpr?
>
> " about display of long lines
> :verbose set wrap? linebreak? breakat?
>
:verbose set textmode? wrapmargin?

textmode
  wrapmargin=0
 
:verbose set formatoptions? formatexpr?

  formatoptions=tcql
        Last set from /usr/share/vim/vim63/ftplugin/mail.vim
E518: Unknown option: formatexpr?

:verbose set wrap? linebreak? breakat?

  wrap
nolinebreak
  breakat= ^I!@*-+;:,./?

Since this non-wrapping behavior only occurs after I issue the
":setlocal keymap=accents" command, I ran these commands both before
and after but the output was strictly identical.

As to to he E518: error message, I run Vim 6.3 - that's the version
available on debian stable, so I assume that this option was
implemented in later versions.

But I am writing this message in Vim and I set the keymap to "accents"
and right now everything is wrapping correctly.  Don't know if this
makes sense but I would appear that the problem only occurs when working
on a .tex file?  So maybe this is a bug/feature that's related to syntax
checking or highlighting?  I need to run another test and try to figure
out what I was doing.  Issue the same above commands while editing latex
stuff and see if it makes a difference.  I will update the thread if I
find something interesting.

> >
> >>Or, if none of the distributed keymaps is exactly what you want, you can
> >>write your own. It isn't hard. See ":help :loadkeymap" for the theory,
> >>and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my
> >>$VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples.

> >>You might want to write something more extensive but this will show you
> >>how to do it.

Already started on this:  copied accents.vim to ~/.vim/keymap/ ..
renamed it to foreign.vim and added the Spanish inverted question /
exclamation marks - an for now I have mapped to "!!" and "??".

> >>
> >Doesn't look like much is missing.. Maybe the French o+e .. but then my
> >screen font doesn't have it either..
>
> The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding,
> neither in capitals (as for titles or if the word "oeuf" [egg] is the
> first of a sentence), nor in lowercase. You need UTF-8 for it, and for
> this relatively rare character you can still use Ctrl-K o e ; or else

Rare enough .. but besides "oeuf" is also occurs in such very common
words as "voeu" [wish] and "coeur" [heart] and it really bothers me when
I see them incorrectly spelled in web pages for instance.  I spot it and
after that I tend to lose focus and not be able to take in what I'm
reading for a short while.

I'm pretty sure there is also a similar a+e / A+E in French as well,
though I could not think of one common word that has this.  I'm pretty
sure that it's the correct spelling for names such as "Aegisthe" or
"Laetitia" but I don't have any printed material where I could check
that for sure.  Only words I can think of right now are "caecum" and
"caetera" (as in  "et caetera") but there's bound to be others.
       
> you can add the following to your vimrc (after setting 'encoding' to
> UTF-8):
>
> lmap OE <Char-338> lmap oe <Char-339>
>
The problem with switching to UTF8 is that practically all the other
applications that I use on a daily basis do not support it correctly -
mutt, slrn, ELinks.. at least not the versions that I am running. I had
a go at it a couple of months back but I ran into so many problems that
I had to switch back to latin1.  Naturally, I could try to run Vim in a
UTF8-capable terminal like uxterm while staying with a latin1 locale - I
understand that this might work - but now that I have gotten used to the
convenience of running all these apps under gnu/screen under a single
xterm I don't think I would want to fire up Vim in a separate xterm on a
regular basis.

Printing was another area where I ran into problems.

So, due to my ignorance of such matters and lack of time I'll have to
keep this on the back burner until either the apps are more mature and
do unicode out-of-the-box..  or until I have the time to look into
this and acquire a better understanding of the issues.

> I'm using "language mappings" here so they will be turned on and off
> together with the keymap.
>

Come to think of it, French would appear to have the most annoying
spelling system of the West European languages that I have some degree
of familiarity with.  Spanish, Italian, and German seem to use fewer
non-ASCII characters.  

In order to set up my foreign language keymap correctly I would really
need tables of all the characters that occur in these languages, decide
which ones are common enough to be worth adding to the keymap, and make
sure I build a scheme that's coherent before I get my fingers to
memorize it.  I'll scour the Wiki's later today.. see if I can find
anything useful.

[..]


Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
cga2000 wrote:

> On Sat, Jul 22, 2006 at 04:40:45PM EDT, A.J.Mechelynck wrote:
>> cga2000 wrote:
>>> On Fri, Jul 21, 2006 at 03:19:25PM EDT, A.J.Mechelynck wrote:
>> [...]
>>> Only minor glitch seems to be that text doesn't wrap when in "INSERT
>>> (lang)" mode.. haven't figured out why yet.. so I just escape out of
>>> insert mode and do a "gqip" once in a while.  Could be unrelated
>>> though..
>> Check your options:
>>
>> " for auto-insert of linebreaks
>> :verbose set textmode? wrapmargin?
>> :verbose set formatoptions? formatexpr?
>>
>> " about display of long lines
>> :verbose set wrap? linebreak? breakat?
>>
> :verbose set textmode? wrapmargin?
>
> textmode
>   wrapmargin=0

...oops... verbose set textwidth? wrapmargin?

and (seeing what you write below) do it with with the active cursor in a
Latex file. Maybe the Latex ftplugin changes textwidth? (A value of zero
means no auto-reformatting.)

>  
> :verbose set formatoptions? formatexpr?
>
>   formatoptions=tcql
>         Last set from /usr/share/vim/vim63/ftplugin/mail.vim

":help fo-table" will tell you what these flags mean.

> E518: Unknown option: formatexpr?
>
> :verbose set wrap? linebreak? breakat?
>
>   wrap
> nolinebreak
>   breakat= ^I!@*-+;:,./?
>
> Since this non-wrapping behavior only occurs after I issue the
> ":setlocal keymap=accents" command, I ran these commands both before
> and after but the output was strictly identical.
>
> As to to he E518: error message, I run Vim 6.3 - that's the version
> available on debian stable, so I assume that this option was
> implemented in later versions.

'formatexpr' is new in version 7. BTW, you can get both 6.4 and 7.0 from
the Vim FTP site. The "current" version is 7.0.039. Compiling Vim is not
really hard -- see my
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for details.

>
> But I am writing this message in Vim and I set the keymap to "accents"
> and right now everything is wrapping correctly.  Don't know if this
> makes sense but I would appear that the problem only occurs when working
> on a .tex file?  So maybe this is a bug/feature that's related to syntax
> checking or highlighting?  I need to run another test and try to figure
> out what I was doing.  Issue the same above commands while editing latex
> stuff and see if it makes a difference.  I will update the thread if I
> find something interesting.
>
>>>
>>>> Or, if none of the distributed keymaps is exactly what you want, you can
>>>> write your own. It isn't hard. See ":help :loadkeymap" for the theory,
>>>> and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim and my
>>>> $VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple examples.
>
>>>> You might want to write something more extensive but this will show you
>>>> how to do it.
>
> Already started on this:  copied accents.vim to ~/.vim/keymap/ ..
> renamed it to foreign.vim and added the Spanish inverted question /
> exclamation marks - an for now I have mapped to "!!" and "??".
>
>>> Doesn't look like much is missing.. Maybe the French o+e .. but then my
>>> screen font doesn't have it either..
>> The French oe (o, e-dans-l'o) is not defined in the Latin1 encoding,
>> neither in capitals (as for titles or if the word "oeuf" [egg] is the
>> first of a sentence), nor in lowercase. You need UTF-8 for it, and for
>> this relatively rare character you can still use Ctrl-K o e ; or else
>
> Rare enough .. but besides "oeuf" is also occurs in such very common
> words as "voeu" [wish] and "coeur" [heart] and it really bothers me when
> I see them incorrectly spelled in web pages for instance.  I spot it and
> after that I tend to lose focus and not be able to take in what I'm
> reading for a short while.
>
> I'm pretty sure there is also a similar a+e / A+E in French as well,
> though I could not think of one common word that has this.  I'm pretty
> sure that it's the correct spelling for names such as "Aegisthe" or
> "Laetitia" but I don't have any printed material where I could check
> that for sure.  Only words I can think of right now are "caecum" and
> "caetera" (as in  "et caetera") but there's bound to be others.
>
>> you can add the following to your vimrc (after setting 'encoding' to
>> UTF-8):
>>
>> lmap OE <Char-338> lmap oe <Char-339>
>>
> The problem with switching to UTF8 is that practically all the other
> applications that I use on a daily basis do not support it correctly -
> mutt, slrn, ELinks.. at least not the versions that I am running. I had
> a go at it a couple of months back but I ran into so many problems that
> I had to switch back to latin1.  Naturally, I could try to run Vim in a
> UTF8-capable terminal like uxterm while staying with a latin1 locale - I
> understand that this might work - but now that I have gotten used to the
> convenience of running all these apps under gnu/screen under a single
> xterm I don't think I would want to fire up Vim in a separate xterm on a
> regular basis.

If your other applications don't support UTF-8 you will have to do
without the OE and oe digraphs.

>
> Printing was another area where I ran into problems.
>
> So, due to my ignorance of such matters and lack of time I'll have to
> keep this on the back burner until either the apps are more mature and
> do unicode out-of-the-box..  or until I have the time to look into
> this and acquire a better understanding of the issues.
>
>> I'm using "language mappings" here so they will be turned on and off
>> together with the keymap.
>>
>
> Come to think of it, French would appear to have the most annoying
> spelling system of the West European languages that I have some degree
> of familiarity with.  Spanish, Italian, and German seem to use fewer
> non-ASCII characters.  
>
> In order to set up my foreign language keymap correctly I would really
> need tables of all the characters that occur in these languages, decide
> which ones are common enough to be worth adding to the keymap, and make
> sure I build a scheme that's coherent before I get my fingers to
> memorize it.  I'll scour the Wiki's later today.. see if I can find
> anything useful.
>
> [..]
>
>
> Thanks
>
> cga
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

cga2000
On Sun, Jul 23, 2006 at 01:12:28PM EDT, A.J.Mechelynck wrote:
[...]

> >textmode
> >  wrapmargin=0
> >  formatoptions=tcql
> >        Last set from /usr/share/vim/vim63/ftplugin/mail.vim
> >  wrap
> >  nolinebreak
> >  breakat= ^I!@*-+;:,./?
>
> and (seeing what you write below) do it with with the active cursor in a
> Latex file. Maybe the Latex ftplugin changes textwidth? (A value of zero
> means no auto-reformatting.)
>
notextmode
  wrapmargin=0
  verbose=0
  formatoptions=tcq
nolinebreak
  wrap
  breakat= ^I!@*-+;:,./?

Interestingly with the cursor in a LaTeX window ":set verbose
formatoptions" does not tell me where the formatoptions are set.. and I
also get a verbose=0 and no clue as to where they are set.

But what's a lot more interesting - to me at least - is that I am now
unable to reproduce the problem.  But then, please keep in mind that I
was struggling with Vim keymaps (that wasn't too hard) but also
non-ASCII rendering in LaTeX.. (and that was an absolute b*tch..) at the
time.. so serendipity allowing - and my ingenuity.. while I was going
through this lenghty trial and error process.. I may have done some very
strange things that I do not remember and that I do not remember.

So I think I have already used up enough of your time for what is
either some subtle - or not so subtle - "feature" of the Vim/LaTeX
add-on stuff and should just keep an eye open for possible
reoccurrences.  If I find something useful, I will update the thread..
or start a new one..  maybe to find out that this was a known bug
with this older release and has long since been fixed.  

:-(

> >Since this non-wrapping behavior only occurs after I issue the
> >":setlocal keymap=accents" command, I ran these commands both before
> >and after but the output was strictly identical.
> >
> >As to to he E518: error message, I run Vim 6.3 - that's the version
> >available on debian stable, so I assume that this option was
> >implemented in later versions.
>
> 'formatexpr' is new in version 7. BTW, you can get both 6.4 and 7.0
> from the Vim FTP site. The "current" version is 7.0.039. Compiling Vim
> is not really hard -- see my
> http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for
> details.
>
Thanks.  As it happens, Vim is just about the only application I have
left on this system that was not compiled from source.  I absolutely
needed features that were not built into the packages available for
debian stable and I was never able to figure out how to build .deb's
from source.

As long as I don't have to upgrade libraries, I guess I should give Vim
7.0 a try at some point.    

[..]
>
> If your other applications don't support UTF-8 you will have to do
> without the OE and oe digraphs.
>
Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
French who are so picky about anything that concerns their language
never came up with a codepage.. or whatever it's called that features
this particular character.  

Thanks

cga


Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
cga2000 wrote:
[...]
> notextmode
>   wrapmargin=0
>   verbose=0
>   formatoptions=tcq
> nolinebreak
>   wrap
>   breakat= ^I!@*-+;:,./?

and what is 'textwidth' set to? (Mentioning 'textmode' was a typo on my
part.)

>
> Interestingly with the cursor in a LaTeX window ":set verbose
> formatoptions" does not tell me where the formatoptions are set.. and I
> also get a verbose=0 and no clue as to where they are set.

To know where options are set, you need 'verbose' >= 1, which can be
done temporarily by prefixing a command with ":verbose". If ":verbose
set textwidth?" doesn't tell you where 'textwidth' was set, then either
you set it manually or it was left at its default.

>
> But what's a lot more interesting - to me at least - is that I am now
> unable to reproduce the problem.  But then, please keep in mind that I
> was struggling with Vim keymaps (that wasn't too hard) but also
> non-ASCII rendering in LaTeX.. (and that was an absolute b*tch..) at the
> time.. so serendipity allowing - and my ingenuity.. while I was going
> through this lenghty trial and error process.. I may have done some very
> strange things that I do not remember and that I do not remember.
>
> So I think I have already used up enough of your time for what is
> either some subtle - or not so subtle - "feature" of the Vim/LaTeX
> add-on stuff and should just keep an eye open for possible
> reoccurrences.  If I find something useful, I will update the thread..
> or start a new one..  maybe to find out that this was a known bug
> with this older release and has long since been fixed.  
>
> :-(

Well, if the problem has spontaneouly disappeared, then so much the
better. If it ever reappears, maybe you'll be better armed to track it down.

[...]

>> If your other applications don't support UTF-8 you will have to do
>> without the OE and oe digraphs.
>>
> Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> French who are so picky about anything that concerns their language
> never came up with a codepage.. or whatever it's called that features
> this particular character.  
>
> Thanks
>
> cga
>
>
>
>

In HTML you can use &#338; and &#339; -- and, with newer browsers, also
&OElig; and &oelig; . I don't know if TeX can do the equivalent (print
characters not found in the current charset) or how.

Otherwise, if the digraphs are not available, you can write them as two
letters (as you did above).


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

Re: Other European languages on a US keyboard

cga2000
On Sun, Jul 23, 2006 at 07:36:22PM EDT, A.J.Mechelynck wrote:
[...]
> and what is 'textwidth' set to? (Mentioning 'textmode' was a typo on my
> part.)
>
  textwidth=80
        Last set from modeline
> >
> >Interestingly with the cursor in a LaTeX window ":set verbose
> >formatoptions" does not tell me where the formatoptions are set.. and I
> >also get a verbose=0 and no clue as to where they are set.

.. messed up.. command history tells me I was issuing a:

   :set verbose formatoptions?

(as mentioned above..)

instead of the requested:

   :verbose set formatoptions?
>
> To know where options are set, you need 'verbose' >= 1, which can be
> done temporarily by prefixing a command with ":verbose". If ":verbose
> set textwidth?" doesn't tell you where 'textwidth' was set, then either
> you set it manually or it was left at its default.
>
.. yet another useful Vim option that I need to memorize..

> >
> >But what's a lot more interesting - to me at least - is that I am now
> >unable to reproduce the problem.  But then, please keep in mind that I
> >was struggling with Vim keymaps (that wasn't too hard) but also
> >non-ASCII rendering in LaTeX.. (and that was an absolute b*tch..) at the
> >time.. so serendipity allowing - and my ingenuity.. while I was going
> >through this lenghty trial and error process.. I may have done some very
> >strange things that I do not remember and that I do not remember.
> >
> >So I think I have already used up enough of your time for what is
> >either some subtle - or not so subtle - "feature" of the Vim/LaTeX
> >add-on stuff and should just keep an eye open for possible
> >reoccurrences.  If I find something useful, I will update the thread..
> >or start a new one..  maybe to find out that this was a known bug
> >with this older release and has long since been fixed.  
> >
> >:-(
>
> Well, if the problem has spontaneouly disappeared, then so much the
> better. If it ever reappears, maybe you'll be better armed to track it down.

I suspect that something else that I did set textwidth to zero.. or did
away with wrap mode..

Since I was doing some copying/pasting via gnu/screen I would suspect I
did a ":set paste" at one point and didn't notice that the "INSERT" at
the bottom of the screen was saying "-- INSERT (lang) (paste) --"
instead of just "-- INSERT (lang) --" .. By then I was getting really
frustrated with LaTeX's lack of short howto type of docs - especially
regarding language packages.. so I may very well have missed that.

I have a feeling it was just a user error and won't occur again.. and if
it does I'll be better equipped .. and in a more relaxed mood.. so I
should be able to address it.

>
> [...]
> >>If your other applications don't support UTF-8 you will have to do
> >>without the OE and oe digraphs.
> >>
> >Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> >French who are so picky about anything that concerns their language
> >never came up with a codepage.. or whatever it's called that features
> >this particular character.  
> >
[..]
> In HTML you can use &#338; and &#339; -- and, with newer browsers,
> also &OElig; and &oelig; . I don't know if TeX can do the equivalent
> (print characters not found in the current charset) or how.
>
I saw in passing that there are indeed symbolics that you can use in
LaTeX to request a character that's missing from the ASCII charset..

> Otherwise, if the digraphs are not available, you can write them as two
> letters (as you did above).
>
>
> Best regards,
> Tony.

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

Matthew Winn
In reply to this post by cga2000
On Sun, Jul 23, 2006 at 06:41:09PM -0400, cga2000 wrote:
> Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> French who are so picky about anything that concerns their language
> never came up with a codepage.. or whatever it's called that features
> this particular character.  

I think it dates from the days when typewriters were popular.  The US
dominance of the market for office equipment prompted many European
languages to manage without combinations like oe, ae and ij where the
characters can be approximated by typing separate letters.  It's easier
to change typing habits than to manufacture a new range of typewriters
just to deal with one special letter.

Prior to computers many keyboards didn't even have separate keys for
the digits 1 and 0, typists using the letters l and O instead.

--
Matthew Winn ([hidden email])
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

cga2000
On Mon, Jul 24, 2006 at 03:36:54AM EDT, Matthew Winn wrote:

> On Sun, Jul 23, 2006 at 06:41:09PM -0400, cga2000 wrote:
> > Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
> > French who are so picky about anything that concerns their language
> > never came up with a codepage.. or whatever it's called that features
> > this particular character.  
>
> I think it dates from the days when typewriters were popular.  The US
> dominance of the market for office equipment prompted many European
> languages to manage without combinations like oe, ae and ij where the
> characters can be approximated by typing separate letters.  It's easier
> to change typing habits than to manufacture a new range of typewriters
> just to deal with one special letter.

.. hmm.. as far as I know only France and Germany went to the trouble of
designing their own typewriter keyboard layouts separate from the QWERTY
model.  I think Polish keyboards are derived from the German layout..  I
would assume variations of the French layout are used in other
French-speaking countries and some African countries..  As to other
European countries - ie. the ones that speak neither French nor German -
I believe that you are correct and that they use derivatives of the US
keyboard.  

Therefore, since the French went so far as building keyboards that have
the basic letters arranged differently (AZERTY instead of QWERTY) it
would not have been such a major enhancement to provide an "oe" some
place on that keyboard..?

I have a feeling it is more a question of whoever designed the original
French typewriter keyboard just did not think it worth bothering with
such typographic niceties as providing an "o dans l'e" (or is it the
other way round?) when the end result with fixed-width characters was
going to be light-years removed from the refinements of traditional
typesetting anyway..

But I would agree that the absence of the "oe" on French keyboards
(typewriters and computers alike) probably accounts for the fact that
you can't find it anywhere in the latin* charsets.
>
> Prior to computers many keyboards didn't even have separate keys for
> the digits 1 and 0, typists using the letters l and O instead.

I was aware of the l/1 thing.. sometimes use it when I feel lazy.

Thanks

cga
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
Warning: off-topic post. Read at your own risk.

cga2000 wrote:

> On Mon, Jul 24, 2006 at 03:36:54AM EDT, Matthew Winn wrote:
>> On Sun, Jul 23, 2006 at 06:41:09PM -0400, cga2000 wrote:
>>> Avoid words such as "coeur".. "boeuf".. etc.  Rather amazing that the
>>> French who are so picky about anything that concerns their language
>>> never came up with a codepage.. or whatever it's called that features
>>> this particular character.  
>> I think it dates from the days when typewriters were popular.  The US
>> dominance of the market for office equipment prompted many European
>> languages to manage without combinations like oe, ae and ij where the
>> characters can be approximated by typing separate letters.  It's easier
>> to change typing habits than to manufacture a new range of typewriters
>> just to deal with one special letter.
>
> .. hmm.. as far as I know only France and Germany went to the trouble of
> designing their own typewriter keyboard layouts separate from the QWERTY
> model.  I think Polish keyboards are derived from the German layout..  I
> would assume variations of the French layout are used in other
> French-speaking countries and some African countries..  As to other
> European countries - ie. the ones that speak neither French nor German -
> I believe that you are correct and that they use derivatives of the US
> keyboard.  
>
> Therefore, since the French went so far as building keyboards that have
> the basic letters arranged differently (AZERTY instead of QWERTY) it
> would not have been such a major enhancement to provide an "oe" some
> place on that keyboard..?
>
> I have a feeling it is more a question of whoever designed the original
> French typewriter keyboard just did not think it worth bothering with
> such typographic niceties as providing an "o dans l'e" (or is it the
> other way round?) when the end result with fixed-width characters was
> going to be light-years removed from the refinements of traditional
> typesetting anyway..
>
> But I would agree that the absence of the "oe" on French keyboards
> (typewriters and computers alike) probably accounts for the fact that
> you can't find it anywhere in the latin* charsets.
>> Prior to computers many keyboards didn't even have separate keys for
>> the digits 1 and 0, typists using the letters l and O instead.
>
> I was aware of the l/1 thing.. sometimes use it when I feel lazy.
>
> Thanks
>
> cga
>
>

Before computers, I used a "French" typewriter keyboard (AZERTY type).
Nowadays I use a "Belgian" computer keyboard (also AZERTY but with
special characters arranged differently). My father has an old
typewriter he bought in Switzerland when he was a student, and it uses a
QWERTZ layout. (Switzerland has four official languages, viz. German,
French, Italian and Romanche; and I don't know how many different
keyboards they use.)

On a mechanical typewriter, it was possible to use "half-spacing" by
holding the space bar down. So, if one wanted to produce the oe digraph
on a French typewriter (not an electric one though), it was possible --
for a perfectionist. Let's say I wanted to type "boeuf" (= beef/ox):

1. press and hold spacebar. This advances the carriage by one half space
2. hit b. This prints b without moving the carriage.
3. release, press and hold spacebar.
4. hit o
5. release spacebar. The carriage is now over the right half of the o.
6. hit e u f in succession.

The oe digraph is called "o, e dans l'o" and the ae digraph is called in
French "a, e dans l'a". The latter as in Serge Gainsbourg's song
"elaeudanla téitéia" (which spells the name "Laetitia").

French typewriters indeed seldom had the digits one and zero: small-ell
and big-oh were used insted. But it even carried over to computers:
Several decades ago (before the merger with Honeywell), the (French)
Bull computer company used on its computers a charset where the same
character could mean either zero or O-for-Oscar depending on context --
and another one, I think, could mean one or I-for-India. (Few computers
had lowercase in those days.) This, of course, caused headaches without
end when trying to convert those computers' magnetic tapes to IBM's BCD
and EBCDIC standards or to (whose? PDP? CDC? other?) ASCII.

I'm not sure non-English non-French non-German speaking countries all
use a US-derived keyboard, even if we limit ourselves to those that use
variants of the Latin alphabet. Typewriters, after all, date back to (I
think) before World War I, a time when English was much less dominant
internationally than it is now. At the courts of St-Petersburg and
Potsdam, French was spoken; Germany and Austria together covered (or had
recently covered) a territory that went from Alsace to Silesia and from
Schleswig-Holstein to the plain of the Po. I suspect that most of
Central Europe would have adopted a German-derived (or maybe
French-derived) keyboard regardless of whether the majority language was
Czech, Slovak, Italian, Hungarian, Croatian...

I agree that the lack of oe OE digraphs in the Latin charsets is
probably due to their absence on French typewriter keyboards. (AE ae
were kept because they are used in Danish.) There is more than a
single-letter difference with English though: not only the layout is
different but there are several accented letters. The French (and
Belgian) keyboards have a dead key for circumflex and
trema/diaeresis/umlaut, but à ç é è ù and sometimes uppercase-C-cedilla
each have their own glyphs. (In French, uppercase letters with the
exception of C-cedilla and sometimes E-acute were usually left
unaccented. I believe computers are slowly pushing back the trend.)


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

Re: Other European languages on a US keyboard

Russell Bateman
As you say, warning: off-topic post. Read at your own risk.

This discussion underlines all the more strongly why I don't attempt to
produce final documents using vim: I sometimes use an actual word
processor like Open Office Writer, but mostly I write in HTML and, of
course, the best HTML editor on the planet is...

...vim!

Russ

P.S. Yes, typing &eacute; , &oelig; and &uuml; is painful, but I'm one
of those perfectionists who would have used half-spacing back in the old
days if I had been in need of such things. My father used a non-electric
typewriter, but I was 19 before I moved to France from the US and needed
what wasn't on the keyboard. After coming back at 25 (some 26+ years ago
now), I never lost the need to communicate and product documents of with
accents, digraphs, etc. in fact, I added the need to compose classical
Greek texts while in France, but that's a whole other mess.


A.J.Mechelynck wrote:

> Warning: off-topic post. Read at your own risk.
>
> Before computers, I used a "French" typewriter keyboard (AZERTY type).
> Nowadays I use a "Belgian" computer keyboard (also AZERTY but with
> special characters arranged differently). My father has an old
> typewriter he bought in Switzerland when he was a student, and it uses
> a QWERTZ layout. (Switzerland has four official languages, viz.
> German, French, Italian and Romanche; and I don't know how many
> different keyboards they use.)
>
> On a mechanical typewriter, it was possible to use "half-spacing" by
> holding the space bar down. So, if one wanted to produce the oe
> digraph on a French typewriter (not an electric one though), it was
> possible -- for a perfectionist. Let's say I wanted to type "boeuf" (=
> beef/ox):
>
> 1. press and hold spacebar. This advances the carriage by one half space
> 2. hit b. This prints b without moving the carriage.
> 3. release, press and hold spacebar.
> 4. hit o
> 5. release spacebar. The carriage is now over the right half of the o.
> 6. hit e u f in succession.
>
> The oe digraph is called "o, e dans l'o" and the ae digraph is called
> in French "a, e dans l'a". The latter as in Serge Gainsbourg's song
> "elaeudanla téitéia" (which spells the name "Laetitia").
>
> French typewriters indeed seldom had the digits one and zero:
> small-ell and big-oh were used insted. But it even carried over to
> computers: Several decades ago (before the merger with Honeywell), the
> (French) Bull computer company used on its computers a charset where
> the same character could mean either zero or O-for-Oscar depending on
> context -- and another one, I think, could mean one or I-for-India.
> (Few computers had lowercase in those days.) This, of course, caused
> headaches without end when trying to convert those computers' magnetic
> tapes to IBM's BCD and EBCDIC standards or to (whose? PDP? CDC?
> other?) ASCII.
>
> I'm not sure non-English non-French non-German speaking countries all
> use a US-derived keyboard, even if we limit ourselves to those that
> use variants of the Latin alphabet. Typewriters, after all, date back
> to (I think) before World War I, a time when English was much less
> dominant internationally than it is now. At the courts of
> St-Petersburg and Potsdam, French was spoken; Germany and Austria
> together covered (or had recently covered) a territory that went from
> Alsace to Silesia and from Schleswig-Holstein to the plain of the Po.
> I suspect that most of Central Europe would have adopted a
> German-derived (or maybe French-derived) keyboard regardless of
> whether the majority language was Czech, Slovak, Italian, Hungarian,
> Croatian...
>
> I agree that the lack of oe OE digraphs in the Latin charsets is
> probably due to their absence on French typewriter keyboards. (AE ae
> were kept because they are used in Danish.) There is more than a
> single-letter difference with English though: not only the layout is
> different but there are several accented letters. The French (and
> Belgian) keyboards have a dead key for circumflex and
> trema/diaeresis/umlaut, but à ç é è ù and sometimes
> uppercase-C-cedilla each have their own glyphs. (In French, uppercase
> letters with the exception of C-cedilla and sometimes E-acute were
> usually left unaccented. I believe computers are slowly pushing back
> the trend.)
>
>
> Best regards,
> Tony.
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

A.J.Mechelynck
Russell Bateman wrote:
> As you say, warning: off-topic post. Read at your own risk.
>
> This discussion underlines all the more strongly why I don't attempt to
> produce final documents using vim: I sometimes use an actual word
> processor like Open Office Writer, but mostly I write in HTML and, of
> course, the best HTML editor on the planet is...
>
> ...vim!

;-)

>
> Russ
>
> P.S. Yes, typing &eacute; , &oelig; and &uuml; is painful, but I'm one
> of those perfectionists who would have used half-spacing back in the old
> days if I had been in need of such things. My father used a non-electric
> typewriter, but I was 19 before I moved to France from the US and needed
> what wasn't on the keyboard. After coming back at 25 (some 26+ years ago
> now), I never lost the need to communicate and product documents of with
> accents, digraphs, etc. in fact, I added the need to compose classical
> Greek texts while in France, but that's a whole other mess.

... and I bought an IBM "ball" typewriter so I could type not only Latin
but also Greek and Russian. I even lent it to the World Esperanto
Congress of 1982 in Antwerp, so journalists could write home in their
respective languages. Don't know if they used it (the keyboard layout
must have felt weird to them).

Somewhere at vim-online I have a script "htmlmap.vim" which
auto-converts ç to &ccedil; É to &Eacute; etc. as you type; and F12 o e
to &#339; etc. (not all browsers understand &oelig; -- or did when I
started: Netscape 4, e.g., didn't).  (Useful when the browser doesn't
know if it's reading UTF-8 or some flavour of Latin.) Source it from
%HOME%\vimfiles\after\ftplugin\html.vim or ~/.vim/after/plugin/html.vim.
I'm not sure if it works when 'encoding' is set to UTF-8 though.


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

RE: Other European languages on a US keyboard

Gene Kwiecinski
In reply to this post by cga2000
>Rare enough .. but besides "oeuf" is also occurs in such very common
>words as "voeu" [wish] and "coeur" [heart] and it really bothers me
when
>I see them incorrectly spelled in web pages for instance.  I spot it
and
>after that I tend to lose focus and not be able to take in what I'm
>reading for a short while.

How're they misspelled?


>>>>Or, if none of the distributed keymaps is exactly what you want, you
can
>>>>write your own. It isn't hard. See ":help :loadkeymap" for the
theory,
>>>>and look at the contents of Bram's $VIMRUNTIME/keymap/accents.vim
and my
>>>>$VIMRUNTIME/keymap/esperanto_utf8.vim for a couple of simple
examples.

>Already started on this:  copied accents.vim to ~/.vim/keymap/ ..
>renamed it to foreign.vim and added the Spanish inverted question /
>exclamation marks - an for now I have mapped to "!!" and "??".

>Come to think of it, French would appear to have the most annoying
>spelling system of the West European languages that I have some degree
>of familiarity with.  Spanish, Italian, and German seem to use fewer
>non-ASCII characters.  

>In order to set up my foreign language keymap correctly I would really
>need tables of all the characters that occur in these languages, decide
>which ones are common enough to be worth adding to the keymap, and make
>sure I build a scheme that's coherent before I get my fingers to
>memorize it.  I'll scour the Wiki's later today.. see if I can find
>anything useful.

If you wouldn't mind, definitely keep me in the loop on this one, as
I've got something of an interest.

Offhand, some contributions and questions:

beta-looking SS (German)
slashed 'l' (Polish)
slashed 'o' (Scandinavian or thereabouts, not sure if Dutch or other)
AElig/aelig/OElig/oelig (Latin, etc.)
ccedil/Ccedil (how done, ",C"?)
ecedil(?) (also Polish, possibly other vowels, 'though don't recall
offhand)

Oh, someone on the list is native Polish, so might ask him.  Was it
Mikolaj?

Dunno anyone Dutch who'd recall the slashed-'o'.

How to enter Aring (eg, &Aring;ngstrom)?  "oA"??  Synonymous with "aa"
(eg, "Haas" == "H&aring;s"?)


Oh, well...
Reply | Threaded
Open this post in threaded view
|

Re: Other European languages on a US keyboard

Charles E Campbell Jr
In reply to this post by cga2000
cga2000 wrote:

>I sometimes need to write text in other languages such as French,
>Spanish and occasionally German or Italian. ..snip..
>
>I would like to do this in Vim.
>
>Unfortunately I only have a US keyboard.
>  
>

Have you considered EasyAccents.vim?

  http://vim.sourceforge.net/scripts/script.php?script_id=451

It doesn't use the spelling checker in vim 7.0, but it accepts
a'
a`
a^
a:
etc to generate accented characters.  Easy to turn on and off, too: \eza
toggles.

Regards,
Chip Campbell

123