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

MacVim: hello Core Text, goodbye toolbar

Expand Messages
  • björn
    Hi, I have pushed two changes that modify default behaviors in MacVim: 1. The toolbar is hidden by default. 2. The experimental renderer is now enabled by
    Message 1 of 3 , Aug 19, 2012
    • 0 Attachment
      Hi,

      I have pushed two changes that modify default behaviors in MacVim:

      1. The toolbar is hidden by default.
      2. The "experimental renderer" is now enabled by default (and it is
      now called the "Core Text renderer").

      Item 1 is because the toolbar is a complete anachronism, and it is
      ugly. I expect it to be even uglier on Retina displays since there
      are no 2x assets for it. (It can be enabled by adding "set go+=T" to
      your ~/.gvimrc.) This point may annoy some users since the toolbar is
      enabled by default in other Vim GUI ports. I'll leave it open for
      discussion.

      Item 2 has been a long time coming. The reason I did not do this
      *sooner* is because there are still some features that the NSTextView
      renderer has which are lacking in the Core Text renderer. In
      particular, you can't double-tap with three fingers over a word to see
      its definition (adding this functionality is a bit complicated but I
      have some proof of concepts in my private repo).

      The reason I was pushed to change the default renderer now was because
      Apple has made changes to NSTextView which completely changes its
      rendering appearance on OS X 10.8 (lines are *a lot* taller than
      before). The Core Text renderer on the other hand looks uniform
      across platforms. Another belated reason is that high-res displays
      are becoming quite common (and of course now there are even Retina
      displays). The NSTextView renderer struggles with these high
      resolutions, whereas the Core Text renderer does not.

      Björn

      --
      You received this message from the "vim_mac" 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
    • Nico Weber
      ... In case you haven t seen it: This got a lot easier to implement in 10.8, since you can implement quickLookWithEvent:, send a request for the word at the
      Message 2 of 3 , Aug 19, 2012
      • 0 Attachment
        > renderer has which are lacking in the Core Text renderer. In
        > particular, you can't double-tap with three fingers over a word to see
        > its definition (adding this functionality is a bit complicated but I
        > have some proof of concepts in my private repo).

        In case you haven't seen it: This got a lot easier to implement in 10.8, since you can implement quickLookWithEvent:, send a request for the word at the cursor position to the vim process, and then asynchronously call showDefinitionForAttributedString:atPoint: once the result arrives.

        (In 10.7 and earlier, one had to implement some synchronous NSTextInput method, which was annoying to do in multiprocess architectures.)

        Nico

        --
        You received this message from the "vim_mac" 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
      • björn
        ... Thanks Nico, I was not aware of that new API. It will certainly make it a lot easier to implement the dictionary popup. I already toyed around with it --
        Message 3 of 3 , Aug 20, 2012
        • 0 Attachment
          > In case you haven't seen it: This got a lot easier to implement in 10.8, since you can implement quickLookWithEvent:, send a request for the word at the cursor position to the vim process, and then asynchronously call showDefinitionForAttributedString:atPoint: once the result arrives.

          Thanks Nico, I was not aware of that new API. It will certainly make
          it a lot easier to implement the dictionary popup. I already toyed
          around with it -- the only problem now is figuring out the right way
          to ask Vim for the word under the mouse pointer and getting the
          coordinates of the start of said word...

          Björn

          --
          You received this message from the "vim_mac" 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
        Your message has been successfully submitted and would be delivered to recipients shortly.