I use Arch Linux + DWM on the X Window System. I can't copy from Vim to an external application, and the vim --version command returns -xterm_clipboard. As I understand it, I need to recompile my Vim and add clipboard support into the config file, but I don't know where to find it. Is it the ~/.vimrc file? I can't find the original PKGBUILD in my ~/vim/ directory either.
I've tried to use pacbuilder-svn and ran:
$ pacbuilder --install --edit vim vim-runtime But the script doesn't ask me whether I want to edit the PKGBUILD file; it just builds the packages and that's it.
I've also tried to use devtools and ran:
$ sudo pkgctl repo clone https://github.com/vim/vim.git But it says:
failed to clone https://github.com/vim/vim.git How can I recompile my Vim with clipboard support? I would be grateful for your help.
xselto pipe data into or out of either the clipboard or selection buffer. I often do stuff likexsel -o | [perl,sed,awk,whatever script or simple tool like sort or grep] | xsel -ibto pipe stuff from the selection, through a script or whatever to transform it somehow, then into the clipboard.set mouse=andset ttymouse=in my~/.vimrc. That leaves mouse selection and copy/paste etc to the terminal & X without interference from vim. i.e. no need for shift when using the mouse in vim. I also haveset pastein my vimrc so that pasting with middle-click doesn't indent. Read vim's docs for details on exactly what these settings do. Also worth noting: standard keybindings like ^C, ^V and Shift-Insert / Ctrl-Shift-Insert also work in terminal apps like vim.vnoremap <C-c> :w !xclip -i -sel c<CR><CR>line in my ~/.vimrc file using xclip package. Also thank you for additional hints and information, I appreciate it.