Triple Click To Select Entire Line In Windows GVIM

47 views
Skip to first unread message

Roy Fulbright

unread,
Nov 22, 2024, 11:12:50 PM11/22/24
to vim...@googlegroups.com
When I triple click a line in GVIM in windows the entire line is selected, but a newline character is part of the selection. How can I triple click a line to select the entire line without the newline character?
Thanks,
Roy

meine

unread,
Nov 23, 2024, 5:52:26 AM11/23/24
to vim...@googlegroups.com
On Sat, Nov 23, 2024 at 04:12:39AM +0000, Roy Fulbright wrote:
> When I triple click a line in GVIM in windows the entire line is selected, but a newline character is part of the selection. How can I triple click a line to select the entire line without the newline character?

Disclaimer: I only work with text files (the proze) and don't do coding.

Is your selection on a line, a sentence or paragraph?

A paragraph can have several sentences, a sentence several lines, a line
several words. These entities all have their own 'nouns' in the VIM
command language.

It depends what VIM-command is behind the tripple-click.

'yy' copies the entire line, also parts that flow forth on new lines
below

'ys' copies the sentence up to the period or whatever mark you set for
the type of file

'yg$' copies til the end of the line with visual characters, but not the
hidden newline. On sentences that flow over several lines this copies
only the line the cursor is on from the cursor position til the enod of
line.

Using the keyboard will give you more control.

KR,

//meine

Roy Fulbright

unread,
Nov 25, 2024, 2:46:37 AM11/25/24
to vim...@googlegroups.com
The selection is a single line. ‘yy’ does not put the selection into the Windows clipboard, which triple clicking does. I just want to get rid of the newline. 

From: 'meine' via vim_use <vim...@googlegroups.com>
Sent: Saturday, November 23, 2024 5:52:04 AM
To: vim...@googlegroups.com <vim...@googlegroups.com>
Subject: Re: Triple Click To Select Entire Line In Windows GVIM
 
--
--
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 https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vim.org%2Fmaillist.php&data=05%7C02%7C%7Ca0aabda2287d48fed47808dd0baceb76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638679559493044831%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=uZNZAlhmO6BQ%2BQAsnOEWI95QMbH82b7IEycwdP8p%2BXg%3D&reserved=0

---
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 visit https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fvim_use%2FZ0Gz1AD9KARS4pPg%2540trackstand&data=05%7C02%7C%7Ca0aabda2287d48fed47808dd0baceb76%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638679559493060480%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=wuMl753OU%2FDd4Ak13KIL4UWH5%2BHDmMA17ylvIeSHOSE%3D&reserved=0.

Igbanam Ogbuluijah

unread,
Nov 25, 2024, 2:54:08 AM11/25/24
to vim...@googlegroups.com
"+yy would 


Igbanam


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.

Roy Fulbright

unread,
Nov 25, 2024, 12:43:48 PM11/25/24
to vim...@googlegroups.com
+yy does not put the text in the Windows clipboard. What I am looking for is an option to turn off the inclusion of newline when I triple-click a line. 
From: vim...@googlegroups.com <vim...@googlegroups.com> on behalf of Igbanam Ogbuluijah <xigb...@gmail.com>
Sent: Monday, November 25, 2024 2:53:43 AM

Christian Brabandt

unread,
Nov 25, 2024, 5:37:21 PM11/25/24
to vim...@googlegroups.com

On Mon, 25 Nov 2024, Roy Fulbright wrote:

> +yy does not put the text in the Windows clipboard. What I am looking
> for is an option to turn off the inclusion of newline when I
> triple-click a line.

"+yy does exactly that, copy the current line into the clipboard in
Windows GVim, but it also contains the final new line. I suppose you can
use the TextYankPost event to strip the final newline if you do not like
it.

Thanks,
Christian
--
Cats are smarter than dogs. You can't make eight cats pull a sled through
the snow.

Roy Fulbright

unread,
Nov 25, 2024, 6:35:56 PM11/25/24
to vim...@googlegroups.com
Hmm … I must be missing something in my setup, because I had tried +yy but the Windows clipboard was empty. 
From: vim...@googlegroups.com <vim...@googlegroups.com> on behalf of Christian Brabandt <cbl...@256bit.org>
Sent: Monday, November 25, 2024 5:37:07 PM

To: vim...@googlegroups.com <vim...@googlegroups.com>
Subject: Re: Triple Click To Select Entire Line In Windows GVIM
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.


---
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.

c.willis111

unread,
Nov 25, 2024, 7:19:43 PM11/25/24
to vim...@googlegroups.com

Hi

I appreciate that Christian is an expert, but in my version of vim typing + does not appear when typing +yy.

 

I wd have expected to type "+yy which does show, and does yank the line into the clipboard.

 

regards - Chris

 

------ Original Message ------
From: rful...@hotmail.com
To: vim...@googlegroups.com
Sent: Monday, November 25th 2024, 23:35
Subject: Re: Triple Click To Select Entire Line In Windows GVIM
 

Hmm … I must be missing something in my setup, because I had tried +yy but the Windows clipboard was empty. 

From: vim...@googlegroups.com <vim...@googlegroups.com> on behalf of Christian Brabandt <cbl...@256bit.org>
Sent: Monday, November 25, 2024 5:37:07 PM
To: vim...@googlegroups.com <vim...@googlegroups.com>
Subject: Re: Triple Click To Select Entire Line In Windows GVIM

 
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsub...@googlegroups.com.

 

-- 


-- 
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 unsub...@googlegroups.com">vim_use+unsub...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/CH3P221MB1492E59A1ADB5B05FEC00B0DDC2E2%40CH3P221MB1492.NAMP221.PROD.OUTLOOK.COM.
 

Roy Fulbright

unread,
Nov 25, 2024, 7:36:47 PM11/25/24
to vim...@googlegroups.com
Unfortunately, adding the double quote before +yy does not work for me either. In fact, any form of yy, etc, etc is not what I am looking for. I simply want to triple click a line and send it to the Windows clipboard without the trailing newline. That’s all. 
From: 'c.willis111 ' via vim_use <vim...@googlegroups.com>
Sent: Monday, November 25, 2024 7:19:29 PM
To: vim...@googlegroups.com <vim...@googlegroups.com>
Subject: Re: Re: Triple Click To Select Entire Line In Windows GVIM
 
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/6f24bfae.26f5.19365d66479.Webtop.204%40btinternet.com.

rob

unread,
Nov 25, 2024, 8:34:15 PM11/25/24
to 'c.willis111 ' via vim_use

I don't know if anyone responded, but the correct key strokes are

quote plus yy

You missed the beginning quote keypress

To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/6f24bfae.26f5.19365d66479.Webtop.204%40btinternet.com.

jr

unread,
Nov 25, 2024, 8:41:10 PM11/25/24
to vim...@googlegroups.com
hi,

On Tue, 26 Nov 2024 at 00:36, Roy Fulbright <rful...@hotmail.com> wrote:
> Unfortunately, adding the double quote before +yy does not work for me either. In fact, any form of yy, etc, etc is not what I am looking for. I simply want to triple click a line and send it to the Windows clipboard without the trailing newline. That’s all.

fwiw, and as a workaround only, entering (cursor at begin of line)
'v'isual to '$', then cursor left removes the newline from the
highlighted.

--
regards, jr.

You have the right to free speech, as long as you're not dumb enough
to actually try it.
(The Clash 'Know Your Rights')

this email is intended only for the addressee(s) and may contain
confidential information. if you are not the intended recipient, you
are hereby notified that any use of this email, its dissemination,
distribution, and/or copying without prior written consent is
prohibited.

Roy Fulbright

unread,
Nov 25, 2024, 10:09:41 PM11/25/24
to vim...@googlegroups.com
Let me try this one more time. While I appreciate all the hints about yy, etc., my question is how to use the triple-click to select a line without adding the new line. I need to know if triple-clicking is hard coded in Gvim to add a new line, and if it is hard coded then there is no solution. If there is an option in Gvim to allow triple clicking to not include the new line, then that is the option I need. Thank you all. 
From: vim...@googlegroups.com <vim...@googlegroups.com> on behalf of rob <drro...@fastmail.com>
Sent: Monday, November 25, 2024 8:34:03 PM
To: 'c.willis111 ' via vim_use <vim...@googlegroups.com>

Marvin Renich

unread,
Nov 26, 2024, 1:02:04 AM11/26/24
to vim...@googlegroups.com
* Roy Fulbright <rful...@hotmail.com> [241125 22:09]:
> Let me try this one more time. While I appreciate all the hints about
> yy, etc., my question is how to use the triple-click to select a line
> without adding the new line. I need to know if triple-clicking is hard
> coded in Gvim to add a new line, and if it is hard coded then there is
> no solution. If there is an option in Gvim to allow triple clicking to
> not include the new line, then that is the option I need. Thank you
> all.

I'm sorry that you are frustrated with the responses you have gotten.
First, the help on this subject can be found at :help gui-mouse and
:help mouse-using.

The short answer is that you can map <3-LeftMouse> to do whatever you
can do with Vim script.

Other than that, a single click moves the cursor to the mouse location,
double click selects the word under the mouse, and triple click selects
line-wise (which implicitly includes the ending newline). Yes, this is
different from the standard Windows behavior.

If, when double or triple clicking, you do not release the mouse, i.e.
hold the button down after the second or third press, then moving the
mouse extends the selection, word-wise for double click and line-wise
for triple click.

You might get almost what you want by moving the mouse to the left of
the line, double clicking without releasing, and then dragging to near
the end of the line. I know it's not as convenient as a triple click,
but without mapping the mouse events, I think that is the best you can
do.

However, all the mouse events can be mapped. Some additional relevant
help topics: Select-mode, gui-selections, and map.

The problem with Vim's help is that it is so extensive that it is
sometimes hard to find exactly what you are looking for!

...Marvin

Reply all
Reply to author
Forward
0 new messages