Friday, January 22, 2016

Re: Dead keys -> digprah input

* Chris Jones <cjns1989@gmail.com> [2016-01-23 01:36]:
> Has anybody heard of a dead key scheme where the user hits
> the printable key first and then adds the diacritic?

umm.. no.

> When you type the Spanish word "qué" for instance, you would first
> type q+u+e... "que" - which has both a different meaning and
> grammatical role from "qué"... and then notice... hmm. I'm missing
> an accent... So now you hit the dead acute key and the "e" at
> the the end of "que" magically becomes "é" in the buffer..

bzzt! when you hit that dead key.. well.. it's dead, you see.
nothing gets sent - nothing is received by vim - nothing happens.

you might tweak your X into sending something, anyway.
why not quit the habit of *hitting* a *dead* key? ;)

instead - how about using a single character like a tick (')
to trigger a function which checks whether the previous character
is one of which could use it as a diacritic - and then compose it?

so type "que" then add a tick ("que'") - and presto: "qué"!

but.. there are not many of those special letters, are there?
so if you dont want to change much then i
suggest using the composition with CTRL-K:

CTRL-K e ' --> é
CTRL-K n ~ --> ñ

but if your situation is that you forgot to type a CTRL-K
and the 'e' or 'n' is already there, then you ":set digraph"
and you can erase it with CTRL-H and type the accent over it:

e CTRL-H ' --> é
n CTRL-H ~ --> ñ

ta-dah! :-)

i had found this neat.. however, i sometimes typed a 't',
erased it, and then typed an 'h' - resulting in a "thorn": þ
and then there are so many combinations which result in
funny characters that i finally ":set nodigraph" again. ;)

see also: ":help digraph"

> Context: I'm proofreading a couple of e-books in Spanish and French
> (using Vim for the editing) and I'm getting aggravated at having to
> hit an extra key each time I need to add or change a diacritic.

well - you must type *something* to correct an error, right?! ;)

Sven [still hoping for that ":dwim" patch to be included..]

--
https://en.wikipedia.org/wiki/Spanish_orthography
"In Spanish text, the letters are ranked from most to least common:
⟨E A O S R N I D L C T U M P B G V Y Q H F Z J Ñ X W K⟩,
and the vowels take around 45% of the text."

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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: