Je déterre une nouvelle fois ce topic pour signaler ceci; il n'y a pas de méthode miracle ou intégrée à VIM pour cette fonctionnalité.
Il a fallu que quelqu'un trouve un hack avec xclip. Cependant, ça fonctionne très bien.
Voici le code à ajouter dans votre ~/.vimrc !
" On ubuntu (running Vim in gnome-terminal)
" The reason for the double-command on <C-c> is due to some weirdness with the X clipboard system.
vmap <C-c> y:call system("xclip -i -selection clipboard", getreg("\""))<CR>:call system("xclip -i", getreg("\""))<CR>
nmap <C-v> :call setreg("\"",system("xclip -o -selection clipboard"))<CR>p
Attention à bien installer xclip:
sudo apt-get install xclip
En mode normal (pas edit) faire: ctrl+v pour coller
En mode visuel (v) faire: ctrl+c pour copier
Ca devrait fonctionner sans problème.
Peut-être à ajouter dans la doc?
La source:
http://vim.wikia.com/wiki/In_line_copy_and_paste_to_system_clipboard