I used mouse=r for a while with set=nu.
To copy paste, it needed me to ctrl+[mouse selection] and manually exclude linenumbers.
mouse=r selecting
CTRL+[mouse=r selecting]
I discovered mouse=a, which allows me to place cursor with mouse, i love that feature.
It automatically exclude line numbers while selecting, and detect end of line, prevent to paste unusefull white space.
But with that mode, middle clic pasting in another term doesn't work.
❯ vim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 11 2017 03:44:53)
Rustines incluses : 1-170
Compilé par Arch Linux
Énorme version sans interface graphique.
Fonctionnalités incluses (+) ou non (-) :
+acl +file_in_path +mouse_sgr +tag_old_static
+arabic +find_in_path -mouse_sysmouse -tag_any_white
+autocmd +float +mouse_urxvt +tcl/dyn
-balloon_eval +folding +mouse_xterm +termguicolors
-browse -footer +multi_byte +terminfo
++builtin_terms +fork() +multi_lang +termresponse
+byte_offset +gettext -mzscheme +textobjects
+channel -hangul_input +netbeans_intg +timers
+cindent +iconv +num64 +title
-clientserver +insert_expand +packages -toolbar
-clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist +perl/dyn +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python/dyn +vreplace
+cscope +lispindent +python3/dyn +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con +lua/dyn +rightleft +writebackup
+diff +menu +ruby/dyn -X11
+digraphs +mksession +scrollbind -xfontset
-dnd +modify_fname +signs -xim
-ebcdic +mouse +smartindent -xpm
+emacs_tags -mouseshape +startuptime -xsmp
+eval +mouse_dec +statusline -xterm_clipboard
+ex_extra +mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
fichier vimrc système : "/etc/vimrc"
fichier vimrc utilisateur : "$HOME/.vimrc"
2me fichier vimrc utilisateur : "~/.vim/vimrc"
fichier exrc utilisateur : "$HOME/.exrc"
fichier de valeurs par défaut : "$VIMRUNTIME/defaults.vim"
$VIM par défaut : "/usr/share/vim"
Compilation : gcc -c -I. -Iproto -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Édition de liens : gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vim -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil -lc -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lieee -lm
.vimrc
set nu
syntax on
set background=dark
hi Normal ctermbg=none
set mouse=a
set nobackup
set tabstop=8
set expandtab
set shiftwidth=4
set softtabstop=4
filetype indent on
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
set nocompatible
set backspace=indent,eol,start
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set autoindent " always set autoindenting on
set laststatus=2
set t_Co=256
let g:powerline_pycmd="py3"
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
This is because there are several clipboards (Xorg managed). Most things use the application clipboard, whilst the terminal is likely to be using the primary clipboard. mouse=r
uses your terminal to perform the copying (and the terminal will use the same clipboard for copying and pasting), mouse=a
uses Vim to perform the clipboard allocation.
Since middle click pasting is a terminal feature, and your terminal is likely to be using the primary clipboard you can tell Vim to yank the text directly into that clipboard.
"*y " (yanks into primary clipboard)
"+y " (yanks into application clipboard)
This is on *nix. On MS Windows it may get more hairy.
Also, the github is really for code issues. This should be closed.
Closed #1388.
"*y "
"+y "
Thx, but what should i do with that ?
Your vim --version
gave you -clipboard
. But if you want to have Vim use the system clipboard, it must be +clipboard
. Maybe, asking the distributor of your distro whether or not they have a clipboard enabled Vim is a first step?
You're right, compiling vim with clipboard worked well (--with-features=huge). But not a good workaround as far as debian and archlinux distro packages are defaultly not using it. But thx for the tip
debian does provide various flavors with vim, some of which do include clipboard feature (e.g. the huge and gui enabled vims). And I am pretty sure, Arch does as well. Also please ask user questions on the vim-use ml. thanks
@eoli3n - That's a key combination:
"
- selects a buffer*
- is the Vim buffer mapped to the primary clipboard+
- is the mapping to the application clipboardy
- performs the yank, into the selected bufferThe rest is a comment.
Btw, Arch has the vim
package which is meant for headless servers. It is almost the equivalent of Debian's vim-tiny
, and is often used on embedded systems. The gvim
Arch package is meant to be used on a desktop, it does contain both Vim and GVim.
The gvim Arch package is meant to be used on a desktop, it does contain both Vim and GVim.
thx a lot, didn't know that :)