[vim/vim] Command line parameter -w {nr} does not do anything (#8011)

10 views
Skip to first unread message

Dominique Pellé

unread,
Mar 26, 2021, 3:47:17 AM3/26/21
to vim/vim, Subscribed

In :help -w, I read:

-w {number}
-w{number}	Set the 'window' option to {number}.

Yet, trying it, I don't see 'window' being set by this command line flag.
Instead, 'window' is always set from the terminal size:

$ vim --clean -w 10
:echo &window
59
:echo &lines
60

Expected behavior
vim --clean -w 10 should set 'window' to 10.
However, I don't really see the need for this command line parameter.
Why not just do vim --clean -c 'set window=10' instead?

I also don't see this behavior of -w {nr} documented when doing vim --help.
So perhaps we're better off removing the code and documentation of -w {nr}
if it does not work anyway? It could break compatibility with older vim
but I suspect that nobody uses it if it does not work.

Environment

  • Vim-8.2.2653 (Linux x86_64), huge, nogui
  • OS: xubuntu-18.04.5


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Christian Brabandt

unread,
Mar 26, 2021, 4:42:12 AM3/26/21
to vim/vim, Subscribed

looks like this is always reset at win_new_shellsize. I am in favor of removing it, since nobody complained about this not working and it removes an ambiguity with the -w option

Bram Moolenaar

unread,
Mar 26, 2021, 9:15:04 AM3/26/21
to vim/vim, Subscribed

Closed #8011 via 0a1a6a1.

Bram Moolenaar

unread,
Mar 26, 2021, 9:20:25 AM3/26/21
to vim/vim, Subscribed


> looks like this is always reset at `win_new_shellsize`. I am in favor of removing it, since nobody complained about this not working and it removes an ambiguity with the `-w` option

This is a very old argument from Ex, taken over by Vi:

−w size Set the value of the window editor option to size.

Let's make it work, for good old times.

--
How To Keep A Healthy Level Of Insanity:
11. Specify that your drive-through order is "to go".

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages