先确认vim是否有这个功能
➜ ~ vim --version | grep clipboard
+clipboard -keymap +printer +vertsplit
-emacs_tags -mouse_gpm -sun_workshop -xterm_clipboard
# +clipboard 我这里是支持多, 如果是减号就是不支持,去安装一下即可
步骤记录
:reg
Type Name Content
l "" ^J
l "0 123^Jpublic java^Jpublic java^Jpublic java^Jpublic java^Jpublic java^J
l "1 ^J
l "2 123^Jpublic java^Jpublic java^Jpublic java^Jpublic java^Jpublic java^J
l "3 ^J
l "4 ^J
l "5 ^J^J
l "6 eval "$(pyenv init -)"^Jeval "$(pyenv init -)"^J
l "7 eval "$(pyenv init -)"^Jeval "$(pyenv init -)"^J
l "8 eval "$(pyenv init -)"^J
l "9 eval "$(pyenv init -)"^J
c "- e
c "* :reg
c ". oo<80>kb<80>kb^@^@
c ": reg
c "% test
c "/ <range>
Press ENTER or type command to continue
# c "* :reg 就是我刚用复制到系统剪贴板到内容
“*p
# 即可