Recent showcmd change?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Recent showcmd change?

Paul-7
I noticed that since around 8.1.1561 (or was it 1651?), showcmd would start showing one-off cursor movements (hjklwbe, etc.) in normal mode, very briefly. It's barely noticeable in gvim, more noticeable when sending the keystrokes over a slow connection (eg., remote SSH) — annoying, then, in fact. Yes, I know it is bad form to hold down those keys, but still, I didn't notice Vim doing that before recently.

 I then noticed that the help says that showcmd is enabled by default in Vim (not sure when that change was made), but when I run `vim -Nu NONE`, `:verbose set showcmd?` shows "noshowcmd". `:scriptnames` confirms no files were loaded, and `:compatible` shows "nocompatible". Am I misunderstanding something there?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190702160719.GA12698%40rainslide.net.
For more options, visit https://groups.google.com/d/optout.

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Recent showcmd change?

Tony Mechelynck
On Tue, Jul 2, 2019 at 6:07 PM Paul <[hidden email]> wrote:
>
[...]
>
>  I then noticed that the help says that showcmd is enabled by default in Vim (not sure when that change was made), but when I run `vim -Nu NONE`, `:verbose set showcmd?` shows "noshowcmd". `:scriptnames` confirms no files were loaded, and `:compatible` shows "nocompatible". Am I misunderstanding something there?

-N -u NONE means "load no vimrc or gvimrc, but start in 'nocompatible'
mode". However, since version 8, when you start Vim with no
command-line switches, then if it finds no vimrc it will source the
$VIMRUNTIME/defaults.vim script, which contains what used to be in
$VIMRUNTIME/vimrc_example.vim (the latter still exists for
compatibility, but nowadays it just sources the former). See ":help
incompatible-8" for details.

There is also a new -u argument value: "vim -u DEFAULTS" will source
the defaults.vim, disregarding any user vimrc, thus starting Vim in a
reproducible way in a modern user-friendly environment. With Vim 7 or
earlier, you could achieve an equivalent result by (e.g. for Vim 7.4
on Unix) "vim -u /usr/local/share/vim/vim74/vimrc_example.vim". (In
that case, -N is not necessary because the first non-comment line of
the erstwhile vimrc_example.vim used to be "set nocompatible".)

Best regards,
Tony.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAJkCKXv-3UyXPKQVW1BmErAK2yGT%3DeaUiEXqB9vyYQJK6W99bA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Recent showcmd change?

Paul-7
On Wed, Jul 03, 2019 at 03:52:28AM +0200, Tony Mechelynck wrote:

>On Tue, Jul 2, 2019 at 6:07 PM Paul <[hidden email]> wrote:
>>
>[...]
>>
>>  I then noticed that the help says that showcmd is enabled by default in Vim (not sure when that change was made), but when I run `vim -Nu NONE`, `:verbose set showcmd?` shows "noshowcmd". `:scriptnames` confirms no files were loaded, and `:compatible` shows "nocompatible". Am I misunderstanding something there?
>
>-N -u NONE means "load no vimrc or gvimrc, but start in 'nocompatible'
>mode". However, since version 8, when you start Vim with no
>command-line switches, then if it finds no vimrc it will source the
>$VIMRUNTIME/defaults.vim script, which contains what used to be in
>$VIMRUNTIME/vimrc_example.vim (the latter still exists for
>compatibility, but nowadays it just sources the former). See ":help
>incompatible-8" for details.
>
>There is also a new -u argument value: "vim -u DEFAULTS" will source
>the defaults.vim, disregarding any user vimrc, thus starting Vim in a
>reproducible way in a modern user-friendly environment. With Vim 7 or
>earlier, you could achieve an equivalent result by (e.g. for Vim 7.4
>on Unix) "vim -u /usr/local/share/vim/vim74/vimrc_example.vim". (In
>that case, -N is not necessary because the first non-comment line of
>the erstwhile vimrc_example.vim used to be "set nocompatible".)
Thanks, Tony. This is why I looked at `:scriptnames` — to be sure that defaults.vim wasn't affecting what I was seeing. So, rather than the observed behaviour being different to what I expected, it was my reading of the documentation that was wrong.

This is confusing.

When the :help says "Vim default: …, set in defaults.vim", we don't really know what the real default is. Using 'showcmd' as an example, if I create a vimrc that contains only "set wrap", and run `vim`, 'showcmd' is off — the real default, which isn't mentioned in `:help 'showcmd'`.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190703104703.GA13223%40rainslide.net.
For more options, visit https://groups.google.com/d/optout.

signature.asc (817 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Recent showcmd change?

Marius Gedminas
On Wed, Jul 03, 2019 at 11:47:03AM +0100, Paul wrote:
> This is confusing.
>
> When the :help says "Vim default: …, set in defaults.vim", we don't
> really know what the real default is. Using 'showcmd' as an example,
> if I create a vimrc that contains only "set wrap", and run `vim`,
> 'showcmd' is off — the real default, which isn't mentioned in `:help
> 'showcmd'`.

But it is!  :help 'showcmd' says

  (Vim default: on, off for Unix,
   Vi default: off, set in defaults.vim)

So if you skip defaults.vim, and you're running vim on Unix, it'll be off.

Regards,
Marius Gedminas
--
"Don't trust a statistic you haven't faked yourself."
        -- Seen in another posting by Markus Kuhn

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190703113235.c3qtqomqoceapdfu%40blynas.
For more options, visit https://groups.google.com/d/optout.

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Recent showcmd change?

Paul-7
In reply to this post by Paul-7
On Tue, Jul 02, 2019 at 05:07:19PM +0100, Paul wrote:
>I noticed that since around 8.1.1561 (or was it 1651?), showcmd would start showing one-off cursor movements (hjklwbe, etc.) in normal mode, very briefly. It's barely noticeable in gvim, more noticeable when sending the keystrokes over a slow connection (eg., remote SSH) — annoying, then, in fact. Yes, I know it is bad form to hold down those keys, but still, I didn't notice Vim doing that before recently.

Any idea about this? It's still happening as of patch 1746. On a remote, slow connection (for visibility), where file is something that Vim has a syntax definition for (again, for visibility), and large enough to scroll up and down for a few moments:

vim -Nu NONE -c 'set showcmd' -c 'syntax on' file

Hold j or k down long enough that Vim has to scroll the file (not just move the cursor). For me, "j"/"k" flickers in the showcmd area.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/20190725113858.GA18983%40rainslide.net.

signature.asc (817 bytes) Download Attachment