Loading ...
Sorry, an error occurred while loading the content.
 

gvim and ASCII glyphs

Expand Messages
  • François Gannaz
    Hello In a few words, here is a patch that makes gvim work better with ligatures in fonts, which can be useful even for programmers. Details follow. I tried to
    Message 1 of 70 , Apr 20, 2014
      Hello

      In a few words, here is a patch that makes gvim work better with ligatures
      in fonts, which can be useful even for programmers. Details follow.

      I tried to use a Hasklig[^1], a font with ligatures intended for the
      Haskell language. It serves the same objective as the Haskell Conceal
      script[^2], but with the added benefit that even a mouse copy-paste works
      as intended.
      [^1]: https://github.com/i-tu/hasklig
      [^2]: http://www.vim.org/scripts/script.php?script_id=3200

      Unfortunately, gvim doesn't support ligatures on ASCII characters. The
      following assertion fails at run-time:

      ascii_glyph_table_init: assertion 'gui.ascii_glyphs->num_glyphs ==
      sizeof(ascii_chars)' failed

      and many characters are displayed with the wrong glyphs.
      The attached patch limits the function ascii_glyph_table_init() to
      spaces and alphanumeric chars. It solves the problem here.

      Yet I wonder if the current hack with ASCII characters is really useful.
      Is there any performance test to check if a simpler behaviour wouldn't be
      suitable, at least for modern desktop installations?
      As the code comment mentions spaces, maybe it should be restricted to
      blank lines?

      Regards
      --
      François

      --
      --
      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 the Google Groups "vim_dev" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Matěj Cepl
      ... I haven’t expected you to do either of these. ... Right, 818 lines of unused vim code is probably more than I would like to have, but it is not that bad
      Message 70 of 70 , Oct 27, 2016
        On 2016-10-27, 21:01 GMT, Charles E Campbell wrote:
        > Well, I don't intend to spend hours re-inventing my scripts
        > which do a lot of housekeeping and are responsible for
        > updating my website, and which work with vimballs. Nor am
        > I about to start keeping your and other's git repositories
        > up-to-date. That said, I don't mind your git repositories,
        > its just that I won't be using them.

        I haven’t expected you to do either of these.

        > Bram asked me to come up with a vim-based way years ago to
        > handle vim plugins; that is the provenance of vimball. Prior
        > to that I myself used tar and gzip.

        Right, 818 lines of unused vim code is probably more than
        I would like to have, but it is not that bad (I was afraid, that
        some parts of vimballs require C implementation, so that it is
        part of vim C codebase). On the other hand, I am not sure why
        vimball should not be kept in a separate external project as all
        other package managers do, but it is probably not that big deal.

        Matěj

        --
        https://matej.ceplovi.cz/blog/, Jabber: mcepl@...
        GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

        I would like to die sleeping, like my father — rather than
        screaming and helpless, like his passengers.

        --
        --
        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 the Google Groups "vim_dev" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      Your message has been successfully submitted and would be delivered to recipients shortly.