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:
[image: 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:⎵):
[image: Screenshot from 2024-10-27 18-30-27.png]

it also does the same thing if i set nolist:
[image: Screenshot from 2024-10-27 18-35-48.png]

Hope that helps explain the issue better.
 

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.

Interestingly, and maybe a hint for a complete solution, if I load up *gvim* 
instead, which loads in a GUI window, it works as expected. 
[image: Screenshot from 2024-10-27 18-39-35.png]

 However, this won't work when I need to copy something from a remote 
server.  The retab! command that BJP mentioned is helpful, and maybe what I 
just have to do going forward, but it would be nice if *vim* just displayed 
the tabs properly.  Not sure what magic it's doing when run from a terminal 
and not sure why that is useful for anyone either...

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_use/44fc6b71-262a-44ff-aa15-2405969f5b2en%40googlegroups.com.

Reply via email to