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

Re: MacVim looks different when invoked as gvim

Expand Messages
  • pperalta@gmail.com
    Hi Björn, Thanks for the tip. However setting this variable with iTerm doesn t seem to make a difference. In fact when I launch a new iTerm window I tried
    Message 1 of 12 , May 1, 2009
      Hi Björn,

      Thanks for the tip. However setting this variable with iTerm doesn't
      seem to make a difference. In fact when I launch a new iTerm window I
      tried this:

      echo $COLORFGBG

      which didn't return anything. I'll dig around through the iTerm
      settings to see if this is implicitly set somewhere else. Or am I
      doing something wrong?

      Thanks for your help!
      -Patrick
      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... How odd. That variable is definitely the problem over here. Try the following: 1. run mvim from iTerm, type :!export when it starts 2. do the same
      Message 2 of 12 , May 1, 2009
        >
        > Thanks for the tip.  However setting this variable with iTerm doesn't
        > seem to make a difference.  In fact when I launch a new iTerm window I
        > tried this:
        >
        > echo $COLORFGBG
        >
        > which didn't return anything.  I'll dig around through the iTerm
        > settings to see if this is implicitly set somewhere else.  Or am I
        > doing something wrong?

        How odd. That variable is definitely the problem over here. Try the following:

        1. run "mvim" from iTerm, type ":!export" when it starts
        2. do the same from Terminal.app

        Look for any differences in the output. For me they are the same,
        except the instance started from iTerm will have the following
        additional entry

        declare -x COLORFGBG="7;0"

        Can you spot any differences?

        Also, I have modified the "Default" bookmark in iTerm so that
        "Display" is set to "Dark Background" (to get a dark instead of white
        background...with the [default] white background the above variable is
        set to "0;15").

        Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • pperalta@gmail.com
        Hi Björn, I saved the output and did a diff: $ diff terminal.txt iterm.txt 12c12
        Message 3 of 12 , May 1, 2009
          Hi Björn,

          I saved the output and did a diff:

          $ diff terminal.txt iterm.txt
          12c12
          < declare -x LANG="en_US.UTF-8"
          ---
          > declare -x LANG="en_US"
          30,31c30
          < declare -x TERM_PROGRAM="Apple_Terminal"
          < declare -x TERM_PROGRAM_VERSION="240"
          ---
          > declare -x TERM_PROGRAM="iTerm.app"

          Changing the default bookmark to a dark background doesn't seem to
          make a difference for me (how odd!).

          Let me know if you'd like for me to try anything else.

          Thanks!
          Patrick
          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • björn
          ... Hmmm. I seem to recall that Vim tries to guess if the background of the terminal window is dark or light on launch. I am guessing that for some reason
          Message 4 of 12 , May 1, 2009
            > I saved the output and did a diff:
            >
            > $ diff terminal.txt iterm.txt
            > 12c12
            > < declare -x LANG="en_US.UTF-8"
            > ---
            >> declare -x LANG="en_US"
            > 30,31c30
            > < declare -x TERM_PROGRAM="Apple_Terminal"
            > < declare -x TERM_PROGRAM_VERSION="240"
            > ---
            >> declare -x TERM_PROGRAM="iTerm.app"
            >
            > Changing the default bookmark to a dark background doesn't seem to
            > make a difference for me (how odd!).

            Hmmm. I seem to recall that Vim tries to "guess" if the background of
            the terminal window is dark or light on launch. I am guessing that
            for some reason it always guesses "dark" in your case. I'll have to
            take a look at the source code in order to understand what is going on
            but since this is not exactly a critical bug I'll do it later (it
            would be very helpful if you could try to take a look at this yourself
            since my terminal "behaves" so it may be harder for me to figure out
            where things go wrong).

            For now adding "set bg=light" or "set bg=dark" to ~/.gvimrc is the
            recommended workaround.

            Björn

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Patrick Peralta
            Hi Björn, The workaround works as advertised. Thanks again, and let me know if you want me to try anything else in a future release. -Patrick ... -- Patrick
            Message 5 of 12 , May 5, 2009
              Hi Björn,

              The workaround works as advertised. Thanks again, and let me know if you want me to try anything else in a future release.

              -Patrick

              On Fri, May 1, 2009 at 4:46 PM, björn <bjorn.winckler@...> wrote:

              > I saved the output and did a diff:
              >
              > $ diff terminal.txt iterm.txt
              > 12c12
              > < declare -x LANG="en_US.UTF-8"
              > ---
              >> declare -x LANG="en_US"
              > 30,31c30
              > < declare -x TERM_PROGRAM="Apple_Terminal"
              > < declare -x TERM_PROGRAM_VERSION="240"
              > ---
              >> declare -x TERM_PROGRAM="iTerm.app"
              >
              > Changing the default bookmark to a dark background doesn't seem to
              > make a difference for me (how odd!).

              Hmmm.  I seem to recall that Vim tries to "guess" if the background of
              the terminal window is dark or light on launch.  I am guessing that
              for some reason it always guesses "dark" in your case.  I'll have to
              take a look at the source code in order to understand what is going on
              but since this is not exactly a critical bug I'll do it later (it
              would be very helpful if you could try to take a look at this yourself
              since my terminal "behaves" so it may be harder for me to figure out
              where things go wrong).

              For now adding "set bg=light" or "set bg=dark" to ~/.gvimrc is the
              recommended workaround.

              Björn





              --
              Patrick Peralta
              http://www.blackbeanbag.net

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---

            Your message has been successfully submitted and would be delivered to recipients shortly.