Ubuntu20.04 vim複製貼上,使用系統剪下板

Singlepledge發表於2020-10-08

Ubuntu20.04 vim複製貼上,使用系統剪下板

安裝vim後,一直很煩惱無法複製貼上(+p/+y)系統的剪下板,經過了各種查詢資料終於找到了解決辦法
ubuntu20.04 需要安裝vim-gtk

sudo apt install vim-gtk

其他版本linux,其他版本桌面,清嘗試安裝vim-x , vim-x11,vim-gnome

安裝完成後在vim命令列模式輸入version
檢視是否支援clipboard
+代表支援
-代表不支援

:version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 15 2020 06:40:31)
Included patches: 1-2269
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               -farsi             -mouse_sysmouse    -tag_any_white
+arabic            +file_in_path      +mouse_urxvt       +tcl
+autocmd           +find_in_path      +mouse_xterm       +termguicolors
+autochdir         +float             +multi_byte        +terminal
-autoservername    +folding           +multi_lang        +terminfo
+balloon_eval      -footer            -mzscheme          +termresponse
+balloon_eval_term +fork()            +netbeans_intg     +textobjects
+browse            +gettext           +num64             +textprop
++builtin_terms    -hangul_input      +packages          +timers
+byte_offset       +iconv             +path_extra        +title
+channel           +insert_expand     +perl              +toolbar
+cindent           +job               +persistent_undo   +user_commands
+clientserver      +jumplist          +postscript        +vartabs
+clipboard         +keymap            +printer           +vertsplit
+cmdline_compl     +lambda            +profile           +virtualedit
+cmdline_hist      +langmap           -python            +visual
+cmdline_info      +libcall           +python3           +visualextra

相關文章