Friday, October 25, 2024

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

On Do, 24 Okt 2024, Taka wrote:

> Hi all,
>
> I'm using the Gnome Terminal with Debian vim-gtk3-9.1.777 (full --version
> below), but when I display a file containing tab characters with more, for
> example, it'll print the tab characters on the screen and I can select them
> with the normal click+drag of my mouse, which will select blocks 8 spaces
> wide.  Likewise, ^⇧C will copy tab characters to the Gnome clipboard and ^⇧V
> will paste them in the terminal or ^V will paste them in any other gtk app.
>
> However, vim  will print the tabs as spaces, even though settings like
> listchars clearly show a tab is there.  Likewise, the mouse selects individual
> space characters and ^⇧C/^⇧V will copy/paste spaces, or the actual characters
> printed by listchars if defined.
>
> How do I get vim to behave more like... well, more in this respect?

I am not sure I understood the question completely. 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,
e.g. copy the whole file into your clipboard use the ex command :%y +

You can also use "+yy to just copy the current line and "+p to paste
from the clipboard

Thanks,
Christian
--
Those of you who think you know everything are annoying those of us who do.

--
--
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+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/ZxuphtEl80qay0oM%40256bit.org.

No comments: