GVIM replace from clipbrard?

19 views
Skip to first unread message

Mike Schleif

unread,
Dec 26, 2021, 5:16:11 PM12/26/21
to vim_use
I use VIM on various *NIX platforms.

I use GVIM on various MS Windows hosts.

I often do this:
1. Copy a string to the clipboard
2. Visual mode select a string
3. :s/<type a string to be replaces>/<Ctrl-v the clipboard string>/g
4. Enter - replace all substrings

This works delightfully everywhere - EXCEPT on Windows host!

On that host, Ctrl-v pastes the entire Visual Mode selection - NOT the originally copied string!

I'm sure that I've got something in that host's VIMRC; but, what is it?

This has been plaguing me for months ...

Please, advise. Thank you.

~ Mike

Paul

unread,
Dec 27, 2021, 1:12:47 PM12/27/21
to vim_use
On Sun, Dec 26, 2021 at 08:42:41AM -0800, Mike Schleif wrote:
>I use VIM on various *NIX platforms.
>
>I use GVIM on various MS Windows hosts.
>
>I often do this:
>1. Copy a string to the clipboard
>2. Visual mode select a string
>3. :s/<type a string to be replaces>/<Ctrl-v the clipboard string>/g
>4. Enter - replace all substrings
>
>This works delightfully everywhere - EXCEPT on Windows host!
>
>On that host, Ctrl-v pastes the entire Visual Mode selection - NOT the
>originally copied string!
>
>I'm sure that I've got something in that host's VIMRC; but, what is it?

See :help CTRL-Q

Mike Schleif

unread,
Dec 27, 2021, 6:15:40 PM12/27/21
to vim_use
--
--
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 vim_use+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/YcoCF8m5JLPWM1W1%40rainslide.net.

Although I think I understand :help CTRL-Q, I fail to understand how that resolves the different behavior on one host.

Gary Johnson

unread,
Dec 28, 2021, 12:11:03 AM12/28/21
to vim_use
On 2021-12-26, Mike Schleif wrote:
> I use VIM on various *NIX platforms.
>
> I use GVIM on various MS Windows hosts.
>
> I often do this:
> 1. Copy a string to the clipboard
> 2. Visual mode select a string
> 3. :s/<type a string to be replaces>/<Ctrl-v the clipboard string>/g
> 4. Enter - replace all substrings
>
> This works delightfully everywhere - EXCEPT on Windows host!
>
> On that host, Ctrl-v pastes the entire Visual Mode selection - NOT the
> originally copied string!
>
> I'm sure that I've got something in that host's VIMRC; but, what is it?

One way to find out the difference between the configurations on
working and non-working hosts would be to run vim or gvim on both
hosts and execute the following on both:

:set nomore
:redir >> hostname.redir
:set! all

Then use vimdiff to compare the two .redir files.

Regards,
Gary

Suresh Govindachar

unread,
Dec 28, 2021, 2:58:40 AM12/28/21
to vim...@googlegroups.com, Mike Schleif

There  are three questions in-lined below.

On 12/27/2021 3:15 PM, Mike Schleif wrote:
On Mon, Dec 27, 2021 at 12:12 PM 'Paul' via vim_use <vim...@googlegroups.com> wrote:
On Sun, Dec 26, 2021 at 08:42:41AM -0800, Mike Schleif wrote:
>I use VIM on various *NIX platforms.
>
>I use GVIM on various MS Windows hosts.
>
>I often do this:
>1. Copy a string to the clipboard
>2. Visual mode select a string

How exactly do you do get into visual mode on the troublesome windows computer?

>3. :s/<type a string to be replaces>/<Ctrl-v the clipboard string>/g
>4. Enter - replace all substrings
>
>This works delightfully everywhere - EXCEPT on Windows host!
>
>On that host, Ctrl-v pastes the entire Visual Mode selection - NOT the
>originally copied string!
>

After issuing the command ":registers" do you see the copied text in some register? If so, which register?

>I'm sure that I've got something in that host's VIMRC; but, what is it?

What do you find if you search in that vimrc file for "-v" (case in-sensitive)?

See :help CTRL-Q


Reply all
Reply to author
Forward
0 new messages