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

Re: Set MacVim window position?

Expand Messages
  • björn
    ... You misunderstand me: what I am trying to say is that window size is _not_ autosaved, but window position is. Also, the way the window position is
    Message 1 of 8 , Aug 28, 2007
    • 0 Attachment

      > Apart from saving the window size, isn't this how MacVim works already?  The
      > window position of the first window opened is stored in the user defaults
      > and restored when the first window is opened again.  Or did they change
      > something in Safari 3?  (I based the current behaviour on Safari 2).

      My copy of MacVim doesn't work this way. Every window I open is the
      same, default size. I just downloaded it yesterday, so I think it's
      the newest version (not sure where to check).

      You misunderstand me:  what I am trying to say is that window size is _not_ autosaved, but window position is.  Also, the way the window position is autosaved works the same way as Safari 2 does (and presumably also Safari 3, unless they've changed this behaviour).

      At the moment, if you want a different default size then open up your .gvimrc and add 'set lines=X columns=Y', where 'X' and 'Y' are your favourite number of lines and columns, respectively.  ( I.e. Y=80 unless you are one of those mean people who write lines that are longer than what can fit on my tiny screen. ;-P)

      > Saving the window size brings up the following question: Which settings
      > should be autosaved?  Ok, we can autosave window position and size, fine.
      > How about the toolbar contents and whether it is hidden or not?  How about
      > all the other gui options (scrollbars, etc.)?  Colorscheme?  Et cetera.
      > Should MacVim even touch these things, since you can already set these in
      > you .gvimrc?
      > I like the idea of autosaving, since this relieves the user of having to
      > know which gvimrc options to set.  Also, it is pretty standard for OS X apps
      > to autosave a lot of information.  My only concern is whether it will offend
      > Vim users to have all this stuff going on "behind the scenes".  I could
      > always make it so that gvimrc settings override the autosaved settings;
      > would that be good?

      If I were making the app, I would probably do it like so:

      Completely ignore existing gVim implementations. Really, does any Vim
      user actually use the save button on the toolbar? We're smarter than
      that :-) Keyboard shortcuts are faster.

      Create a standard OS X Preferences window for all of the preferences I
      wanted to show via the GUI, both Vim-standard and MacVim-specific.

      Save everything in the preferences pane in the standard mac way
      (sorry, don't know what this is, a plist file I guess?). This would
      include the autosaved window size.

      Allow for everything in the preferences pane to also be set
      via .vimrc, which would override the GUI settings.

      Of course, seeing as I've got almost nil experience developing Cocoa
      apps, I can't exactly put my money where my mouth is :-)

      I'm still undecided on this topic, but I tend to think that completely ignoring current Vim behaviour is a bad idea.  Still, thanks for your opinions...I will take them into consideration.


      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.