Feature Request: Formal support for Ligatures.

106 views
Skip to first unread message

Kevin Lozandier

unread,
Aug 31, 2015, 5:13:03 AM8/31/15
to vim_dev
Ligature support being added to Vim I highly recommend being pursued more than ever.

Mainstream monospace fonts are now supporting ligatures that add sensible & rational value to everyday programmers.

Montotype fonts with ligatures allow programmers to more clearly see the intent of typed code. To account for those who have unique requirements to use non-monotype fonts, this should be an explicit option added to Vim 7.5/8.


Tony Mechelynck

unread,
Sep 5, 2015, 2:09:43 PM9/5/15
to vim_dev
You mean the following?
ff U+FB00 LATIN SMALL LIGATURE FF
fi U+FB01 LATIN SMALL LIGATURE FI
fl U+FB02 LATIN SMALL LIGATURE FL
ffi U+FB03 LATIN SMALL LIGATURE FFI
ffl U+FB04 LATIN SMALL LIGATURE FFL
ſt U+FB05 LATIN SMALL LIGATURE LONG S T
st U+FB06 LATIN SMALL LIGATURE ST

Vim already supports them (with +multi_byte compiled-in, some iconv library available if it is dynamically linked, and 'encoding' set to UTF-8, of course). IIRC, it already supported them in version 6.2 and maybe earlier.

If you want to make these ligatures more easily accessible and not have to remember their character codes, you could for instance add the following to your vimrc:

dig ff 64256 fi 64257 fl 64258 qi 64259 ql 64260 qt 64261 st 64262

and voilà: from there, Ctrl-K f f (three keystrokes, the first one a two-key chord) in Insert mode gives ff (one character) in the file being edited.

See:
:help :digraphs
http://www.unicode.org/charts/PDF/UFB00.pdf
http://vim.wikia.com/wiki/Working_with_Unicode
etc.

George V. Reilly

unread,
Sep 5, 2015, 6:27:42 PM9/5/15
to Vim Developers
​Several monospace fonts have recently grown support for programmer-related ligatures, such as https://github.com/i-tu/Hasklig and https://github.com/tonsky/FiraCode.

BTW, there's a great list of monospaced fonts at https://github.com/chrissimpkins/codeface​
-- 
/George V. Reilly  geo...@reilly.org  Twitter: @georgevreilly

Kevin Lozandier

unread,
Oct 18, 2015, 5:02:08 PM10/18/15
to vim_dev
I & many are expect true ligature support by enabling them to be used JIT rather than add anything to vimrc other than to turn them off for those who are *not* using monospace typefaces for whatever reason & don't want such typefaces have their ligatures activated that are not oriented for fode.

Tony Mechelynck

unread,
Oct 18, 2015, 8:44:50 PM10/18/15
to vim_dev, Bram Moolenaar
On Sun, Oct 18, 2015 at 11:02 PM, Kevin Lozandier <loza...@gmail.com> wrote:
> I & many are expect true ligature support by enabling them to be used JIT rather than add anything to vimrc other than to turn them off for those who are *not* using monospace typefaces for whatever reason & don't want such typefaces have their ligatures activated that are not oriented for fode.

Vim does not support non-monospace typefaces.

Even in GTK2, where it is possible to set 'guifont' to a non-monospace
font name, Vim always displays one character per cell (or one CJK
"wide" character per two cells) and these cells all have the same
size, with the result that if you are ill-advised enough to set
'guifont' to a proportional font, your "m"s will appear cramped and
your "I"s, "i"s and "l" will appear lonely.

This is so basic in Vim philosophy that I don't expect Bram to do a
complete overhaul of an otherwise well-working editor just to satisfy
one user's whim. You could, of course, program it yourself (the source
is there and the license allows it) but even if you succeed, IMHO such
a "deep" new feature would need extensive testing _and_ extensive
approval by the user community (in the form, maybe, of many users
patching their source with it) before it would be accepted into the
main Vim source. In the past, Bram has been reluctant to accept even
some generally accepted features such as the "second wave" of
trigonometric functions.

Best regards,
Tony.

Kevin Lozandier

unread,
Oct 18, 2015, 10:35:21 PM10/18/15
to vim...@googlegroups.com, Bram Moolenaar
Great, if Vim doesn't support non-monos pace typefaces, it seems even less barriers for ligatures to be supported (those users don't exist) 

Ligatures with monospace typefaces are especially valuable for languages with functional capabilities such as Haskell & modern (ES6) JavaScript.


--
--
You received this message from the "vim_dev" 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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/Cw-Mi00xuqo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Kevin Lozandier


Christian Brabandt

unread,
Oct 19, 2015, 3:51:11 AM10/19/15
to vim...@googlegroups.com
Am 2015-10-18 23:02, schrieb Kevin Lozandier:
> I & many are expect true ligature support by enabling them to be used
> JIT rather than add anything to vimrc other than to turn them off for
> those who are *not* using monospace typefaces for whatever reason &
> don't want such typefaces have their ligatures activated that are not
> oriented for fode.

You might want to reconsider your expectations. Vim is an OpenSource
project. We are doing everything here for fun and not for profit. As
such we do not provide professional support.

You want something done? Fine. Provide patches.

Best,
Christian

Kevin Lozandier

unread,
Oct 19, 2015, 5:01:48 AM10/19/15
to vim...@googlegroups.com
Sorry for the confusion; I wasn't expecting anything. I was merely stating that ligature support for monospace tyoefaces involves are much more than what conceal & etc. provide up to this point.
--
--
You received this message from the "vim_dev" 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 a topic in the Google Groups "vim_dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_dev/Cw-Mi00xuqo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Kevin Lozandier


Reply all
Reply to author
Forward
0 new messages