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

winpos works if I source .vimrc but not on startup

Expand Messages
  • Chris Lott
    ... However, when I start MacVim, the window position doesn t get set properly. But if I source my .vimrc with a window open, the position is set correctly
    Message 1 of 5 , Nov 26, 2012
    • 0 Attachment
      I have the following in my .vimrc:
      :winpos 30 30

      However, when I start MacVim, the window position doesn't get set
      properly. But if I source my .vimrc with a window open, the position
      is set correctly (the window jumps to the proper position).

      How can I get the window to the right position upon startup?

      c
      --
      Chris Lott <chris@...>

      --
      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
    • Kyle Lippincott
      Put it in your .gvimrc, not your vimrc. ... -- You received this message from the vim_mac maillist. Do not top-post! Type your reply below the text you are
      Message 2 of 5 , Nov 26, 2012
      • 0 Attachment
        Put it in your .gvimrc, not your vimrc.

        On Mon, Nov 26, 2012 at 11:23 PM, Chris Lott <chris@...> wrote:
        I have the following in my .vimrc:
        :winpos 30 30

        However, when I start MacVim, the window position doesn't get set
        properly. But if I source my .vimrc with a window open, the position
        is set correctly (the window jumps to the proper position).

        How can I get the window to the right position upon startup?

        c
        --
        Chris Lott <chris@...>

        --
        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

        --
        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
      • Chris Lott
        ... Same problem. It might have to do with the fact that I include a file with functions if gui is running rather than using a .gvimrc file. c -- Chris Lott
        Message 3 of 5 , Nov 26, 2012
        • 0 Attachment
          On Mon, Nov 26, 2012 at 10:28 PM, Kyle Lippincott <spectral@...> wrote:
          > Put it in your .gvimrc, not your vimrc.

          Same problem. It might have to do with the fact that I include a file
          with functions if gui is running rather than using a .gvimrc file.

          c
          --
          Chris Lott <chris@...>

          --
          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
        • Tony Mechelynck
          ... to be remembered until GUI startup if you use it before the GUI has started. I don t know what the differences are in this respect between MacVim and the
          Message 4 of 5 , Nov 27, 2012
          • 0 Attachment
            On Nov 27, 8:24 am, Chris Lott <ch...@...> wrote:
            > I have the following in my .vimrc:
            > :winpos 30 30
            >
            > However, when I start MacVim, the window position doesn't get set
            > properly. But if I source my .vimrc with a window open, the position
            > is set correctly (the window jumps to the proper position).
            >
            > How can I get the window to the right position upon startup?
            >
            > c
            > --
            > Chris Lott <ch...@...>

            :winpos {xvalue} {yvalue} is one of the few settings which is supposed
            to be "remembered until GUI startup" if you use it before the GUI has
            started. I don't know what the differences are in this respect between
            MacVim and the other flavours of gvim, but if you suspect that the
            command is issued "too early", you can move it into an autocommand for
            the GUIEnter event, which is triggered immediately after successfully
            starting the GUI and opening the GUI window, before the VimEnter event
            for GUI Vim.

            see

            --
            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
          • Tony Mechelynck
            On Nov 27, 11:36 am, Tony Mechelynck ... oops, hit Send too fast ... Best regards, Tony. -- BROTHER MAYNARD: Armaments Chapter
            Message 5 of 5 , Nov 27, 2012
            • 0 Attachment
              On Nov 27, 11:36 am, Tony Mechelynck <antoine.mechely...@...>
              wrote:
              > On Nov 27, 8:24 am, Chris Lott <ch...@...> wrote:
              >
              > > I have the following in my .vimrc:
              > > :winpos 30 30
              >
              > > However, when I start MacVim, the window position doesn't get set
              > > properly. But if I source my .vimrc with a window open, the position
              > > is set correctly (the window jumps to the proper position).
              >
              > > How can I get the window to the right position upon startup?
              >
              > > c
              > > --
              > > Chris Lott <ch...@...>
              >
              > :winpos {xvalue} {yvalue} is one of the few settings which is supposed
              > to be "remembered until GUI startup" if you use it before the GUI has
              > started. I don't know what the differences are in this respect between
              > MacVim and the other flavours of gvim, but if you suspect that the
              > command is issued "too early", you can move it into an autocommand for
              > the GUIEnter event, which is triggered immediately after successfully
              > starting the GUI and opening the GUI window, before the VimEnter event
              > for GUI Vim.
              >
              oops, hit Send too fast
              > see
              :help GUIEnter
              :help autocmd.txt

              Best regards,
              Tony.
              --
              BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
              ANOTHER MONK: And St. Attila raised his hand grenade up on high
              saying "O
              Lord bless this thy hand grenade that with it thou
              mayest
              blow thine enemies to tiny bits, in thy mercy. "and
              the Lord
              did grin and people did feast upon the lambs and
              sloths and
              carp and anchovies and orang-utans and breakfast
              cereals and
              fruit bats and...
              BROTHER MAYNARD: Skip a bit brother ...
              "Monty Python and the Holy Grail" PYTHON (MONTY)
              PICTURES LTD

              --
              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.