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

BPJ <[email protected]>
Newsgroups gmane.editors.vim
Message-ID <CADAJKhCdw8TtevF65-zMfS556SEqiHM21JxsU=vTkV+cM1BMXw@mail.gmail.com>
Den tors 24 okt. 2024 22:07Taka <[email protected]> skrev:

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

:setlocal noexpandttab↲

aka

:setl noet

and perhaps

:list

:nolist

to disable as you probably don't want it on all the time

HTH,

/bpj


> Thanks, Best Regards.
>
> $ cat ~/.vimrc
> " tried various settings, but currently have:
> set autoindent smartindent
> set shiftwidth=4 tabstop=4
> set noexpandtab smarttab
>
> $ vim --version
> VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Oct 15 2024 01:45:11)
> Included patches: 1-777
> Modified by [email protected]
> Compiled by [email protected]
> Huge version with GTK3 GUI.  Features included (+) or not (-):
> +acl               +file_in_path      +mouse_urxvt       -tag_any_white
> +arabic            +find_in_path      +mouse_xterm       +tcl
> +autocmd           +float             +multi_byte        +termguicolors
> +autochdir         +folding           +multi_lang        +terminal
> -autoservername    -footer            -mzscheme          +terminfo
> +balloon_eval      +fork()            +netbeans_intg     +termresponse
> +balloon_eval_term +gettext           +num64             +textobjects
> +browse            -hangul_input      +packages          +textprop
> ++builtin_terms    +iconv             +path_extra        +timers
> +byte_offset       +insert_expand     +perl              +title
> +channel           +ipv6              +persistent_undo   +toolbar
> +cindent           +job               +popupwin          +user_commands
> +clientserver      +jumplist          +postscript        +vartabs
> +clipboard         +keymap            +printer           +vertsplit
> +cmdline_compl     +lambda            +profile           +vim9script
> +cmdline_hist      +langmap           -python            +viminfo
> +cmdline_info      +libcall           +python3           +virtualedit
> +comments          +linebreak         +quickfix          +visual
> +conceal           +lispindent        +reltime           +visualextra
> +cryptv            +listcmds          +rightleft         +vreplace
> +cscope            +localmap          +ruby              +wildignore
> +cursorbind        +lua               +scrollbind        +wildmenu
> +cursorshape       +menu              +signs             +windows
> +dialog_con_gui    +mksession         +smartindent       +writebackup
> +diff              +modify_fname      +sodium            +X11
> +digraphs          +mouse             +sound             +xattr
> +dnd               +mouseshape        +spell             -xfontset
> -ebcdic            +mouse_dec         +startuptime       +xim
> +emacs_tags        +mouse_gpm         +statusline        -xpm
> +eval              -mouse_jsbterm     -sun_workshop      +xsmp_interact
> +ex_extra          +mouse_netterm     +syntax            +xterm_clipboard
> +extra_search      +mouse_sgr         +tag_binary        -xterm_save
> -farsi             -mouse_sysmouse    -tag_old_static
>    system vimrc file: "/etc/vim/vimrc"
>      user vimrc file: "$HOME/.vimrc"
>  2nd user vimrc file: "~/.vim/vimrc"
>  3rd user vimrc file: "~/.config/vim/vimrc"
>       user exrc file: "$HOME/.exrc"
>   system gvimrc file: "/etc/vim/gvimrc"
>     user gvimrc file: "$HOME/.gvimrc"
> 2nd user gvimrc file: "~/.vim/gvimrc"
> 3rd user gvimrc file: "~/.config/vim/gvimrc"
>        defaults file: "$VIMRUNTIME/defaults.vim"
>     system menu file: "$VIMRUNTIME/menu.vim"
>   fall-back for $VIM: "/usr/share/vim"
> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
> -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6
> -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16
> -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi
> -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/x86_64-linux-gnu -I/usr/include/webp
> -I/usr/include/gio-unix-2.0 -I/usr/include/cloudproviders
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0
> -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0
> -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -pthread -Wdate-time -g -O2
> -Werror=implicit-function-declaration
> -ffile-prefix-map=/build/reproducible-path/vim-9.1.0777=.
> -fstack-protector-strong -fstack-clash-protection -Wformat
> -Werror=format-security -fcf-protection -DSYS_VIMRC_FILE=\"/etc/vim/vimrc\"
> -DSYS_GVIMRC_FILE=\"/etc/vim/gvimrc\" -D_REENTRANT -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=1
> Linking: gcc -Wl,-E -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lgtk-3
> -lgdk-3 -lz -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0
> -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0
> -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra
> -lsodium -lacl -lattr -lgpm -L/usr/lib -llua5.1 -Wl,-E
> -fstack-protector-strong -L/usr/local/lib
> -L/usr/lib/x86_64-linux-gnu/perl/5.40/CORE -lperl -ldl -lm -lpthread
> -lcrypt -L/usr/lib/python3.12/config-3.12-x86_64-linux-gnu -lpython3.12
> -ldl -lm -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm
> -lruby-3.1 -lm -L/usr/lib
>
> --
> --
> 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/ac28c879-6d0e-4639-baf5-b4468b56ec20n%40googlegroups.com
> <https://groups.google.com/d/msgid/vim_use/ac28c879-6d0e-4639-baf5-b4468b56ec20n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
-- 
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/CADAJKhCdw8TtevF65-zMfS556SEqiHM21JxsU%3DvTkV%2BcM1BMXw%40mail.gmail.com.
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.