[vim/vim] clipboard+=unnamed does not affect paste (#7822)

21 views
Skip to first unread message

John Little

unread,
Feb 11, 2021, 11:45:37 PM2/11/21
to vim/vim, Subscribed

The default (for X) "exclude:cons|linux" phrase in the 'clipboard' option stops the "unnamed" phrase from affecting paste with 'p':

  1. Run vim --clean
  2. Type three lines:
    alfa
    bravo
    charlie
  3. On the first line, type "*yy
  4. On the third, type yy
  5. :set clipboard+=unnamed
  6. Type p - "charlie" is pasted, "alfa" was expected
  7. :set clipboard=autoselect,unnamed,exclude:cons\|linux
  8. Type 'p - "alfa" is pasted, correctly

vim version 8.2.2466, Ubuntu 20.10, xterm and konsole.


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

Gary Johnson

unread,
Feb 12, 2021, 12:17:42 PM2/12/21
to reply+ACY5DGHDMOAVQIVFVN...@reply.github.com, vim...@googlegroups.com
On 2021-02-11, John Little wrote:
> The default (for X) "exclude:cons|linux" phrase in the 'clipboard' option stops
> the "unnamed" phrase from affecting paste with 'p':
>
> 1. Run vim --clean
> 2. Type three lines:
> alfa
> bravo
> charlie
> 3. On the first line, type "*yy
> 4. On the third, type yy
> 5. :set clipboard+=unnamed

Instead, try

:set clipboard^=unnamed

Note the last lines of ":help 'clipboard' where it says for the
"exclude:{pattern}" option/name:

The rest of the option value will be used for {pattern}, this
must be the last entry.

See also

:help :set^=

> 6. Type p - "charlie" is pasted, "alfa" was expected
> 7. :set clipboard=autoselect,unnamed,exclude:cons\|linux
> 8. Type 'p - "alfa" is pasted, correctly
>
> vim version 8.2.2466, Ubuntu 20.10, xterm and konsole.

Regards,
Gary

vim-dev ML

unread,
Feb 12, 2021, 12:18:08 PM2/12/21
to vim/vim, vim-dev ML, Your activity

On 2021-02-11, John Little wrote:
> The default (for X) "exclude:cons|linux" phrase in the 'clipboard' option stops
> the "unnamed" phrase from affecting paste with 'p':
>
> 1. Run vim --clean
> 2. Type three lines:
> alfa
> bravo
> charlie
> 3. On the first line, type "*yy
> 4. On the third, type yy

> 5. :set clipboard+=unnamed

Instead, try

:set clipboard^=unnamed

Note the last lines of ":help 'clipboard' where it says for the
"exclude:{pattern}" option/name:

The rest of the option value will be used for {pattern}, this
must be the last entry.

See also

:help :set^=

> 6. Type p - "charlie" is pasted, "alfa" was expected

> 7. :set clipboard=autoselect,unnamed,exclude:cons\|linux
> 8. Type 'p - "alfa" is pasted, correctly

>
> vim version 8.2.2466, Ubuntu 20.10, xterm and konsole.

Regards,
Gary

Bram Moolenaar

unread,
Feb 12, 2021, 2:49:02 PM2/12/21
to vim/vim, vim-dev ML, Comment

Closed #7822.


You are receiving this because you commented.

John Little

unread,
Feb 13, 2021, 1:12:40 AM2/13/21
to vim/vim, vim-dev ML, Comment

Gary:


The rest of the option value will be used for {pattern}, this
must be the last entry.

I looked for something like that, repeatedly, but didn't see it. Thank you.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages