Re: Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-03 Thread Lifepillar

On 02/02/2018 23:31, Andrew Pennebaker wrote:

Hello,

I would really like convenient access to ligatures in my word processing 
software. Unfortunately, none of the major text editing applications 
appears to handle ligatures intelligently: Each of Emacs, Vim, Nano, MS 
Word, Google Drive, Libre Office, and InDesign type a dumb "ae" when the 
user presses the a and e keyboard keys, whereas historically this 
sequence is typically rendered with the ash æ rune.


I am able to work around this limitation in most applications by 
configuring TextExpander (macOS, Windows) or autokey (Linux) to match 
the keyboard sequence "ae" and replace this with "æ". This allows most 
UTF-8 compatible graphical software, from Web browsers to document 
editors, to correctly insert æ in place of ae. However, traditional text 
editors including Emacs, Vim, and Nano are evidently NOT able to handle 
a literal æ rune insertion, and tend to raise a generic error message 
when the text expander application attempts to insert this key.


Besides what others have suggested, on macOS I'd recommend Ukelele
(http://scripts.sil.org/ukelele). It allows you to easily define your
own system-wide keyboard layouts. According to the web site: "Ukelele
can assign multiple-character strings and can create "dead keys", where
a keystroke sets a new state that modifies the output of the following
keystroke."

Hope this helps,
Life.

--
--
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-02 Thread Gary Johnson
On 2018-02-03, Tony Mechelynck wrote:
> On Fri, Feb 2, 2018 at 11:47 PM, Gary Johnson wrote:
> > On 2018-02-02, Andrew Pennebaker wrote:
> >
> >> I would really like convenient access to ligatures in my word processing
> >> software. Unfortunately, none of the major text editing applications 
> >> appears to
> >> handle ligatures intelligently: Each of Emacs, Vim, Nano, MS Word, Google
> >> Drive, Libre Office, and InDesign type a dumb "ae" when the user presses 
> >> the a
> >> and e keyboard keys, whereas historically this sequence is typically 
> >> rendered
> >> with the ash ć rune.
> >
> > :imap ae ae
> >
> > See
> >
> > :help 24.9
> >
> > Regards,
> > Gary
> 
> No need for a mapping, it is a standard binding if yout Vim is
> compiled with +digraphs

Mine are compiled with +diagraphs, but the two-character sequence ae
is not automatically translated to ć.  That only happens if I prefix
ae with Ctrl-K.  I understood the OP to want ae to be translated to
ć without having to type anything else.

Regards,
Gary

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-02 Thread Tony Mechelynck
On Fri, Feb 2, 2018 at 11:47 PM, Gary Johnson  wrote:
> On 2018-02-02, Andrew Pennebaker wrote:
>
>> I would really like convenient access to ligatures in my word processing
>> software. Unfortunately, none of the major text editing applications appears 
>> to
>> handle ligatures intelligently: Each of Emacs, Vim, Nano, MS Word, Google
>> Drive, Libre Office, and InDesign type a dumb "ae" when the user presses the 
>> a
>> and e keyboard keys, whereas historically this sequence is typically rendered
>> with the ash æ rune.
>
> :imap ae ae
>
> See
>
> :help 24.9
>
> Regards,
> Gary

No need for a mapping, it is a standard binding if yout Vim is
compiled with +digraphs

Or you can use a keymap. Maybe there is one already, but if there
isn't, you can make one yourself, see
http://vim.wikia.com/wiki/How_to_make_a_keymap

Best regards,
Tony.

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-02 Thread Erik Christiansen
On 02.02.18 16:31, Andrew Pennebaker wrote:
> I would really like convenient access to ligatures in my word processing
> software. Unfortunately, none of the major text editing applications
> appears to handle ligatures intelligently: Each of Emacs, Vim, Nano, MS
> Word, Google Drive, Libre Office, and InDesign type a dumb "ae" when the
> user presses the a and e keyboard keys, whereas historically this sequence
> is typically rendered with the ash æ rune.

OK, but Vim handles all sorts of ligatures quite elegantly.
(See :h digraphs , and to list them :digraphs)
Granted, when I write emails in Danish, it quickly becomes tedious to
type ^Kae for æ, so I have the following mappings:

" Mapping Style:
:let mapleader = ";"

" Mapping åæø and «» is handier than digraphs:
inoremap  a "\uE5"
inoremap  e "\uE6"
inoremap  o "\uF8"
inoremap   "\uAB"
inoremap  > "\uBB"

Now ;e gives æ, ;a gives å, and ;o gives ø. While it's only one double
keystroke less, the typing style is much more natural and fully
mnemonic. Using  instead of e would reduce it to one double
keystroke, but I find it mnemonically convenient to reserve the alt key
for more broadly transformative actions. If you need a literal ;e, as
in these examples, then ^V;e makes the semicolon literal.

If you need thorn, it's ^Kth, giving þ. Also useful is ^K2S when needing
e.g. m², and ^K+- for ±.

So it's all there, and has been for at least one decade, probably
two. And with mappings, convenience can be amplified.

Erik

-- 
When printing with movable type was invented around 1450, typefaces included
many ligatures and additional letters, such as the letter þ (thorn) which was
first substituted in English with y (e.g. ye olde shoppe), but later written as
th. - http://en.wikipedia.org/wiki/Ligature_%28typography%29

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-02 Thread Gary Johnson
On 2018-02-02, Andrew Pennebaker wrote:

> I would really like convenient access to ligatures in my word processing
> software. Unfortunately, none of the major text editing applications appears 
> to
> handle ligatures intelligently: Each of Emacs, Vim, Nano, MS Word, Google
> Drive, Libre Office, and InDesign type a dumb "ae" when the user presses the a
> and e keyboard keys, whereas historically this sequence is typically rendered
> with the ash æ rune.

:imap ae ae

See

:help 24.9

Regards,
Gary

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Neither Emacs nor Vim nor Nano handle ligature literal insertion well

2018-02-02 Thread Andrew Pennebaker
Hello,

I would really like convenient access to ligatures in my word processing
software. Unfortunately, none of the major text editing applications
appears to handle ligatures intelligently: Each of Emacs, Vim, Nano, MS
Word, Google Drive, Libre Office, and InDesign type a dumb "ae" when the
user presses the a and e keyboard keys, whereas historically this sequence
is typically rendered with the ash æ rune.

I am able to work around this limitation in most applications by
configuring TextExpander (macOS, Windows) or autokey (Linux) to match the
keyboard sequence "ae" and replace this with "æ". This allows most UTF-8
compatible graphical software, from Web browsers to document editors, to
correctly insert æ in place of ae. However, traditional text editors
including Emacs, Vim, and Nano are evidently NOT able to handle a literal æ
rune insertion, and tend to raise a generic error message when the text
expander application attempts to insert this key. This may be a result of a
conflict between shell encodings (need UTF-8 everywhere, though I'm
currently typing this with a bare Windows COMSPEC command prompt session).
In any case, it stinks that the user cannot easily insert ligatures into
text editors, so copying & pasting from Wikipedia via the OS clipboard
appears to be one of the more (in)convenient options for accessing
ligatures. We can do better!

-- 
Cheers,
Andrew

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.