Re: [vim/vim] patch 7.4.2111 (8c08b5b)

112 views
Skip to first unread message

Derek Schrock

unread,
Nov 20, 2016, 6:12:42 PM11/20/16
to vim/vim

Can this be reverted to not set mouse=a? This seems a bit drastic of change for a default setting. For users without a .vimrc (root, new users, non-vim users) I think this causes more problems than it solves for purely ssh environments. I mainly use the native OS' (sshing-from) clipboard/select. With this set you're forced to have a ~/.vimrc mainly root.


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

Bram Moolenaar

unread,
Nov 21, 2016, 3:58:25 PM11/21/16
to vim/vim

Derek Schrock wrote:

> Can this be reverted to not set mouse=a? This seems a bit drastic of
> change for a default setting. For users without a .vimrc (root, new
> users, non-vim users) I think this causes more problems than it solves
> for purely ssh environments. I mainly use the native OS'
> (sshing-from) clipboard/select. With this set you're forced to have a
> ~/.vimrc mainly root.

What problems?

--
I wonder how much deeper the ocean would be without sponges.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Derek Schrock

unread,
Nov 21, 2016, 5:58:29 PM11/21/16
to vim/vim
On Mon, Nov 21, 2016 at 03:58:09PM EST, Bram Moolenaar wrote:
>
> Derek Schrock wrote:
>
> > Can this be reverted to not set mouse=a? This seems a bit drastic of
> > change for a default setting. For users without a .vimrc (root, new
> > users, non-vim users) I think this causes more problems than it solves
> > for purely ssh environments. I mainly use the native OS'
> > (sshing-from) clipboard/select. With this set you're forced to have a
> > ~/.vimrc mainly root.
>
> What problems?

In an ssh env I find that when I use vim via sudo I'll lose native
selection since the norm (for me at least) is root without a .vimrc.

So now with mouse=a in defaults I need to make sure root either unsets
mouse via set mouse= or an empty ~/.vimrc.

I've since figured out shift-click disables so that's a possible work
around for me.

But for this feature to exist before it was set in defaults it seems the
only people that benefit would be people that don't have .vimrc files or
non-vim users. Once they have ~/.vimrc chances are they'll lose mouse
functionality since they didn't know mouse= needs set.

So I think mouse should be something people opt in to not something
that's enabled by default for terminal/ssh sessions.

Bram Moolenaar

unread,
Nov 22, 2016, 5:06:04 PM11/22/16
to vim/vim

Derek Schrock wrote:

> > > Can this be reverted to not set mouse=a? This seems a bit drastic of
> > > change for a default setting. For users without a .vimrc (root, new
> > > users, non-vim users) I think this causes more problems than it solves
> > > for purely ssh environments. I mainly use the native OS'
> > > (sshing-from) clipboard/select. With this set you're forced to have a
> > > ~/.vimrc mainly root.
> >
> > What problems?
>
> In an ssh env I find that when I use vim via sudo I'll lose native
> selection since the norm (for me at least) is root without a .vimrc.

How is that a problem? When using Visual mode the selection should also
be made available. Is this Vim compiled without X11 support?


> So now with mouse=a in defaults I need to make sure root either unsets
> mouse via set mouse= or an empty ~/.vimrc.
>
> I've since figured out shift-click disables so that's a possible work
> around for me.

Right, using shift is the way to switch to have the terminal emulator
handle the mouse.


> But for this feature to exist before it was set in defaults it seems the
> only people that benefit would be people that don't have .vimrc files or
> non-vim users. Once they have ~/.vimrc chances are they'll lose mouse
> functionality since they didn't know mouse= needs set.
>
> So I think mouse should be something people opt in to not something
> that's enabled by default for terminal/ssh sessions.

Without enabling the mouse you can't position the cursor or use the
scrollwheel in Vim. Since for the selection you can make it work with
the shift key, I still think that setting the 'mouse' option by default
is the best choice.

--
Nothing is fool-proof to a sufficiently talented fool.


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Derek Schrock

unread,
Nov 22, 2016, 8:45:21 PM11/22/16
to vim/vim
On Tue, Nov 22, 2016 at 05:05:48PM EST, Bram Moolenaar wrote:
>
> Derek Schrock wrote:
>
> > > > Can this be reverted to not set mouse=a? This seems a bit drastic of
> > > > change for a default setting. For users without a .vimrc (root, new
> > > > users, non-vim users) I think this causes more problems than it solves
> > > > for purely ssh environments. I mainly use the native OS'
> > > > (sshing-from) clipboard/select. With this set you're forced to have a
> > > > ~/.vimrc mainly root.
> > >
> > > What problems?
> >
> > In an ssh env I find that when I use vim via sudo I'll lose native
> > selection since the norm (for me at least) is root without a .vimrc.
>
> How is that a problem? When using Visual mode the selection should also
> be made available. Is this Vim compiled without X11 support?
>
Correct, this is vim without X11 support. Sometimes this is vim running
inside ssh jumpboxes (ssh and ProxyCommand/-W) without X11 Forwarding
from MacOS to Linux/FreeBSD.


> > So now with mouse=a in defaults I need to make sure root either unsets
> > mouse via set mouse= or an empty ~/.vimrc.
> >
> > I've since figured out shift-click disables so that's a possible work
> > around for me.
>
> Right, using shift is the way to switch to have the terminal emulator
> handle the mouse.
>
> > But for this feature to exist before it was set in defaults it seems the
> > only people that benefit would be people that don't have .vimrc files or
> > non-vim users. Once they have ~/.vimrc chances are they'll lose mouse
> > functionality since they didn't know mouse= needs set.
> >
> > So I think mouse should be something people opt in to not something
> > that's enabled by default for terminal/ssh sessions.
>
> Without enabling the mouse you can't position the cursor or use the
> scrollwheel in Vim. Since for the selection you can make it work with
> the shift key, I still think that setting the 'mouse' option by default
> is the best choice.


You are receiving this because you are subscribed to this thread.

James McCoy

unread,
Nov 23, 2016, 10:45:18 AM11/23/16
to vim/vim

Without enabling the mouse you can't position the cursor or use the scrollwheel in Vim. Since for the selection you can make it work with the shift key, I still think that setting the 'mouse' option by default is the best choice.

Except that there are a lot of people who don't know that holding shift makes the terminal handle the mouse instead of Vim. This was the biggest complaint I got when Debian got the updated packages, specifically because what they had been doing for many years stopped working and they didn't know how to fix it or work around it.

Also, when using the mouse in a console via gpm, holding shift doesn't override the behavior so those users have no work around. The update just broke behavior they were used it.

Christian Brabandt

unread,
Nov 23, 2016, 10:51:30 AM11/23/16
to vim/vim

Is that only a problem for people using su (e.g. using Vim as root)? Then perhaps a check for being root could help here?

Derek Schrock

unread,
Nov 23, 2016, 11:04:44 AM11/23/16
to vim/vim
On Wed, Nov 23, 2016 at 10:51:14AM EST, Christian Brabandt wrote:
> Is that only a problem for people using su (e.g. using Vim as root)? Then perhaps a check for being root could help here?

It could be an issue for anyone that didn't have a .vimrc file. I think
root would be the most popular of that class of users.


You are receiving this because you are subscribed to this thread.

James McCoy

unread,
Nov 23, 2016, 11:08:17 AM11/23/16
to vim/vim

It could be an issue for anyone that didn't have a .vimrc file.

Correct, and there are far more of those than I would have expected.

I think root would be the most popular of that class of users.

Right, so the environment that's most uncommonly used and typically for quick tasks now behaves quite differently than experience has taught for the past couple decades.

Tony Mechelynck

unread,
Nov 23, 2016, 6:10:39 PM11/23/16
to vim_dev, reply+00b1d198bb422d26aff27f978c747a43ac43ad5...@reply.github.com, vim/vim
On Wed, Nov 23, 2016 at 5:08 PM, James McCoy <vim-dev...@256bit.org> wrote:
> It could be an issue for anyone that didn't have a .vimrc file.
>
> Correct, and there are far more of those than I would have expected.
>
> I think root would be the most popular of that class of users.
>
> Right, so the environment that's most uncommonly used and typically for
> quick tasks now behaves quite differently than experience has taught for the
> past couple decades.
>

IMHO, even for root it's better to have a vimrc; but nowadays, without
a vimrc you don't anymore get 'compatible' but defaults.vim. That is
IMHO "saner" but of course it is not backward-compatible. There are
several ways to counteract it explicitly.

On my home computer (which no one uses except me) my /root/.vimrc
(vimrc for root) is actually a symlink to /home/tonymec/.vimrc (vimrc
for my usual non-root username) which belongs to user "tonymec", group
"users" so either of these login names can modify it and it will
always be common to both, making Vim behave identically in both cases
(considering that I explicitly set to the value I prefer any option
known to me with different defaults for root and for others). Easier
for my peace of mind.

Best regards,
Tony.

vim-dev ML

unread,
Nov 23, 2016, 6:10:58 PM11/23/16
to vim/vim, vim-dev ML, Your activity


You are receiving this because you are subscribed to this thread.

Reply all
Reply to author
Forward
0 new messages