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

:vertical causes Vim to shift "extended" monitors

Expand Messages
  • David Fishburn
    Vim 7.2. Included patches: 1-245 Win XP SP3 I have a laptop and a monitor. I use the Windows feature which allows me to extend my screen to the other
    Message 1 of 2 , Oct 1, 2009
    • 0 Attachment
      Vim 7.2.
      Included patches: 1-245
      Win XP SP3

      I have a laptop and a monitor.
      I use the Windows feature which allows me to "extend" my screen to the
      other monitor.

      I have been doing this for some time and I always have my extended
      monitor to the "right" side of my laptop (which is the main screen, it
      has the taskbar).

      Anyway, I just moved my extended screen so that it is above my
      existing monitor instead of to the right of it.

      Now I have noticed a strange behaviour.

      If I move Vim to be in the extended monitor above my laptop, then I
      have these values:

      :echo getwinposx() getwinposy()
      -15 -1183

      If I run this command:
      :split

      My current window is split horizontally.
      Everything is good.

      But, if I run this command:
      :vertical split

      Then my Vim snaps back into my laptop screen and splits vertically.

      :echo getwinposx() getwinposy()
      0 0

      So, I don't see any reason why adding the "vertical" keyword should
      change the behaviour.
      Of course, I don't want it to do this either since toggling the
      Taglist plugin does a vertical split so this has become a real pain in
      the butt.

      I would consider this a bug, but thought I would check here first.

      Any suggestions?

      TIA,
      Dave

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • David Fishburn
      ... I should mention I created these maps: Reposition gvim when using the windows extended monitor Top and bottom nnoremap fx :exec winpos
      Message 2 of 2 , Oct 1, 2009
      • 0 Attachment
        > Any suggestions?

        I should mention I created these maps:

        " Reposition gvim when using the windows extended monitor
        " Top and bottom
        nnoremap <Leader>fx :exec 'winpos '.(getwinposx()<0 ? '15' :
        '-15').' '.(getwinposy()<0 ? '17' : '-1183')<CR>
        nnoremap <Leader>fx <C-O>:exec 'winpos '.(getwinposx()<0 ? '15' :
        '-15').' '.(getwinposy()<0 ? '17' : '-1183')<CR>
        " Left and right
        " nnoremap <Leader>fx :exec 'winpos '.(getwinposx()<1900 ? '2055'
        : '276').' 14'<CR>
        " nnoremap <Leader>fx <C-O>:exec 'winpos '.(getwinposx()<1900 ?
        '2055' : '276').' 14'<CR>


        They let me toggle which extended monitor my Vim is in, so switching
        back and forth is quick and efficient, it is just a pain that I want
        this bug fixed or explained.

        Dave

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.