Re: How to display and copy tabs as tabs in GTK env?

Christian Brabandt <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <[email protected]>
On So, 27 Okt 2024, Taka wrote:

> On Friday, October 25, 2024 at 7:22:12 AM UTC-7 Christian Brabandt wrote:
> 
>     I am not sure I understood the question completely.
> 
> Ok, let's try this.  Let's make a test document, enter this in your terminal (as I'm entering in my gnome-terminal window):
> 
> vim tabtest
> i0        1         2
> 12345678901234567890
> <tab>1<tab>2<esc>:wq
> 
> So the first two lines will count spaces and the last two lines will count tabs, with the last line starting with a tab.
> Now display it with more:
> more tabtest
> Visually, the two tab lines are shown with a 7-character wide space in between, with an 8-character wide space at the beginning of the last line.
> Now, try to select the area between 0 and 1 with your mouse, put your pointer under the 4 and click and drag to the 5, like you were trying to select "45", but in the white space underneath.  Since more printed a tab, a tab is selected, and the selection expands to cover the width of the tab:
> Screenshot from 2024-10-27 17-48-26.png
> This can be copied/pasted as a tab anywhere now with whatever your favorite method is (^⇧C/^⇧V, right-click context menu copy/paste, ^Ins/⇧Ins).
> Now, display it with vim and try to do the same, it won't let you.  It'll select 2 spaces under the "4" and "5", even tho listchars is showing a tab is there, which i defined with some box drawing chars (set lcs=eol:┤,tab:╾┈╸,space:⎵):
> Screenshot from 2024-10-27 18-30-27.png
> 
> it also does the same thing if i set nolist:
> Screenshot from 2024-10-27 18-35-48.png

I tried that in putty and Windows terminal. In both cases, I could 
select only the 2 "blanks" and it did not visually select the actual tab 
characters.  So it behaves like vim for me.

> Hope that helps explain the issue better.

That's why I suggested to use the clipboard register to copy the actual 
values directly instead of selecting what the terminal "sees".

>     But if you want to
>     copy the actual values instead of the visual representation of thte
>     characters on the screen, please learn to use the clipboard register,
> 
> Thanks, I know how to use vim's clipboard, but it's internal only and I need to copy/paste between different servers i'm connected to (via SSH) and that just won't work.

So you are using a remote connection. You did not mention this before.
Try using ssh -x/-y to forward the X11 connection.

Thanks,
Christian
-- 
Don't tell me that worry doesn't do any good.  I know better.  The things
I worry about don't happen.
		-- Watchman Examiner

-- 
-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_use/Zx9B%2BPCJxHihIj7%2B%40256bit.org.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.