added 74 characters in body
Source Link
user938271
  • 5.3k
  • 1
  • 10
  • 20

I guess that set columns=161 does not take effect immediately. Maybe not until Vim displays a window, which according to :h startup happens after the vimrc is read. The latter is processed in the third step of the documentation, while the windows are still not displayed in the 11th step:

  1. Open all windows When the |-o| flag was given, windows will be opened (but not displayed yet). When the |-p| flag was given, tab pages will be created (but not displayed yet).

In any case, try to delay :vsplit until VimEnter (12th and last step in the initialization process), so that you're sure that all the initializations have been performed, and a Vim window with the correct geometry is currently displayed:

au VimEnter * vsplit

Which gives:

if has("gui_running"'gui_running') && has('vim_starting')
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif

I guess that set columns=161 does not take effect immediately. Maybe not until Vim displays a window, which according to :h startup happens after the vimrc is read. The latter is processed in the third step of the documentation, while the windows are still not displayed in the 11th step:

  1. Open all windows When the |-o| flag was given, windows will be opened (but not displayed yet). When the |-p| flag was given, tab pages will be created (but not displayed yet).

In any case, try to delay :vsplit until VimEnter, so that you're sure that all the initializations have been performed, and a Vim window with the correct geometry is currently displayed:

au VimEnter * vsplit

Which gives:

if has("gui_running")
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif

I guess that set columns=161 does not take effect immediately. Maybe not until Vim displays a window, which according to :h startup happens after the vimrc is read. The latter is processed in the third step of the documentation, while the windows are still not displayed in the 11th step:

  1. Open all windows When the |-o| flag was given, windows will be opened (but not displayed yet). When the |-p| flag was given, tab pages will be created (but not displayed yet).

In any case, try to delay :vsplit until VimEnter (12th and last step in the initialization process), so that you're sure that all the initializations have been performed, and a Vim window with the correct geometry is currently displayed:

au VimEnter * vsplit

Which gives:

if has('gui_running') && has('vim_starting')
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif
added 601 characters in body
Source Link
user938271
  • 5.3k
  • 1
  • 10
  • 20

I guess that set columns=161 does not take effect immediately. Try Maybe not until Vim displays a window, which according to :h startup happens after the vimrc is read. The latter is processed in the third step of the documentation, while the windows are still not displayed in the 11th step:

  1. Open all windows When the |-o| flag was given, windows will be opened (but not displayed yet). When the |-p| flag was given, tab pages will be created (but not displayed yet).

In any case, try to delay :vsvsplit until VimEnter, so that you're sure that all the initializations have been performed, and a Vim window with the correct geometry is currently displayed:

au VimEnter * vsplit

Which gives:

if has("gui_running")
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif

I guess that set columns=161 does not take effect immediately. Try to delay :vs until VimEnter:

au VimEnter * vsplit

Which gives:

if has("gui_running")
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif

I guess that set columns=161 does not take effect immediately. Maybe not until Vim displays a window, which according to :h startup happens after the vimrc is read. The latter is processed in the third step of the documentation, while the windows are still not displayed in the 11th step:

  1. Open all windows When the |-o| flag was given, windows will be opened (but not displayed yet). When the |-p| flag was given, tab pages will be created (but not displayed yet).

In any case, try to delay :vsplit until VimEnter, so that you're sure that all the initializations have been performed, and a Vim window with the correct geometry is currently displayed:

au VimEnter * vsplit

Which gives:

if has("gui_running")
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif
Source Link
user938271
  • 5.3k
  • 1
  • 10
  • 20

I guess that set columns=161 does not take effect immediately. Try to delay :vs until VimEnter:

au VimEnter * vsplit

Which gives:

if has("gui_running")
    " GUI is running or is about to start.
    set lines=51 columns=161
    set guioptions -=T
    set guifont=InputMono:h10
    " Split the window
    set equalalways
    au VimEnter * vsplit
endif