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

specify window size using gvim scrip

Expand Messages
  • Jeremy Conlin
    I use the gvim script which I downloaded from macvim.org several months ago. I was wondering if there is some way of telling gvim the size of the window you
    Message 1 of 3 , Aug 30, 2006
      I use the gvim script which I downloaded from macvim.org several
      months ago. I was wondering if there is some way of telling gvim the
      size of the window you want. It defaults to about 80-90 characters
      wide and the height of the screen. This is perfect if you are editing
      one file, but if you are editing two (or more) vertically split files
      or want to diff some files then you have to manually resize the
      (cocoa) window and then adjust the size of the split (vim) windows.
      Is there an easier way to do this? Is there a way to specify a
      default window size?
      Thanks,
      Jeremy
    • Nicolas Weber
      Hi Jeremy, ... You can put the line set colums=160 in your _vimrc file (see :he _vimrc), this sets the window width to 160 characters. Other interesting
      Message 2 of 3 , Aug 30, 2006
        Hi Jeremy,

        > Is there an easier way to do this? Is there a way to specify a
        > default window size?

        You can put the line
        set colums=160
        in your _vimrc file (see :he _vimrc), this sets the window width to
        160 characters. Other interesting settings are 'set lines=40' (set
        window height) and 'winpos 140 80' (set window position).

        Bye,
        Nico
      • Jeremy Conlin
        ... Thanks. I knew there was a way to specify the window size, but I couldn t find out how to do it. After checking those things you suggested, I found the
        Message 3 of 3 , Aug 30, 2006
          On 8/30/06, Nicolas Weber <nicolasweber@...> wrote:
          > Hi Jeremy,
          >
          > > Is there an easier way to do this? Is there a way to specify a
          > > default window size?
          >
          > You can put the line
          > set colums=160
          > in your _vimrc file (see :he _vimrc), this sets the window width to
          > 160 characters. Other interesting settings are 'set lines=40' (set
          > window height) and 'winpos 140 80' (set window position).
          >
          > Bye,
          > Nico
          >
          Thanks. I knew there was a way to specify the window size, but I
          couldn't find out how to do it. After checking those things you
          suggested, I found the ":winsize" command which is exactly what I
          needed. I can specify the size when gvim is called as:

          gvim -c "winsize {width} {height}"

          And that does what I want.
          Thanks,
          Jeremy
        Your message has been successfully submitted and would be delivered to recipients shortly.