
要说完全没法用还好说,关键是,有时能用,有时不能用,没办法了粘贴的时候只能调出 gedit 去复制,之后再用 vim 编辑 vim 的版本
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 2 2014 19:39:32) Included patches: 1-52 Modifed by [email protected] Compiled by buildd@ Huge version without GUI. Features included (+) or not (-): +acl +farsi +mouse_netterm +syntax +arabic +file_in_path +mouse_sgr +tag_binary +autocmd +find_in_path -mouse_sysmouse +tag_old_static -balloon_eval +float +mouse_urxvt -tag_any_white -browse +folding +mouse_xterm -tcl ++builtin_terms -footer +multi_byte +terminfo +byte_offset +fork() +multi_lang +termresponse +cindent +gettext -mzscheme +textobjects -clientserver -hangul_input +netbeans_intg +title -clipboard +iconv +path_extra -toolbar +cmdline_compl +insert_expand -perl +user_commands +cmdline_hist +jumplist +persistent_undo +vertsplit +cmdline_info +keymap +postscript +virtualedit +comments +langmap +printer +visual +conceal +libcall +profile +visualextra +cryptv +linebreak +python +viminfo +cscope +lispindent -python3 +vreplace +cursorbind +listcmds +quickfix +wildignore +cursorshape +localmap +reltime +wildmenu +dialog_con -lua +rightleft +windows +diff +menu -ruby +writebackup +digraphs +mksession +scrollbind -X11 -dnd +modify_fname +signs -xfontset -ebcdic +mouse +smartindent -xim +emacs_tags -mouseshape -sniff -xsmp +eval +mouse_dec +startuptime -xterm_clipboard +ex_extra +mouse_gpm +statusline -xterm_save +extra_search -mouse_jsbterm -sun_workshop -xpm system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" fall-back for $VIM: "/usr/share/vim" Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 Linking: gcc -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions 1 kotomi 2016 年 7 月 18 日 你是怎么复制的?我"+y -> "+p 总是成功的,编辑状态下 command + c -> command + v 也是可以的。 |
2 ceyes 2016 年 7 月 18 日 的确容易被这些剪切板 /寄存器搞得头晕眼花,索性 :vs 打开另一个文件然后复制粘贴就简单多了 |
3 3pointer 2016 年 7 月 18 日 via iPhone 你需要 tmux |
4 dong4138 2016 年 7 月 18 日 vim: "+y 复制到剪切板 tmux: <c-b>[ |
5 RIcter 206 年 7 月 18 日 via iPhone vim 里 :set paste |
6 xinali OP |
7 xinali OP 还有一点需要说明的是,每次最多只能复制 50 line 。。。 |
8 HHehr0ow 2016 年 7 月 18 日 :reg 看看剪贴板里都是些啥内容 |
9 Bardon 2016 年 7 月 18 日 vim --version | grep clipboard 看下,如果编译开关没打开 则装个 gvim 吧 |
10 seoguess 2016 年 7 月 18 日 这个问题我也纠结过。 set pas 自动补全,我记不住,然后 i 插入 然后 set nopas 取消 就不会错位了。 |
11 ETiV 2016 年 7 月 18 日 via iPhone vim 复制内容我都是打开文件 A ,再 :tabnew 文件 B 复制好后 gt 、粘贴 |
13 wlsnx 2016 年 7 月 19 日 +clipboard 直接 p |
14 morefreeze 2016 年 7 月 19 日 分享个复制的 map 吧,仔细看注释 " Allow to copy/paste between VIM instances "copy the current visual selection to ~/.vbuf vmap <leader>y :w! ~/.vbuf<cr> "copy the current line to the buffer file if no visual selection nmap <leader>y :.w! ~/.vbuf<cr> |
15 bp0 2016 年 7 月 19 日 set clipboard=unnamed 可以默认使用系统的剪贴板 |
16 xinali OP @morefreeze leader 是什么? |
17 morefreeze 2016 年 7 月 19 日 :help leader 看一下,简单来说就是个按键,默认是\ |
19 ashfinal 2016 年 7 月 23 日 感觉楼上回复的都比较模糊混乱,这里统一说一下: 为啥要用 "+y "+p 这种方式呢,直接 yy p 不行么?我一般都是用插件 yankring 的。这是个可视化多剪贴板,很有用。 +clipboard 选项是与外部程序共享剪贴板的。没这特性,从 firefox 或其它程序复制文本,在 vim 直接按 p 是粘贴不进来的。看楼主 :version 输出信息这项是 -clipboard ,可以考虑有空的时候重新编译下 vim 。 一般 gvim 这一选项默认都是开的。 set (no)paste 选项是从外部粘贴过来防止格式缩进错乱的,与粘不粘得进来关系不大。 麻烦对照下重新阐释下自己遇到的问题。 顺便打个广告,我的 vimrc 配置: https://github.com/ashfinal/vimrc-config |
20 chemzqm 2016 年 7 月 29 日 自己编译吧 你这个 vim 版本太老了一点 clipboard 也没启用 |
21 ThomasZ 2016 年 9 月 18 日 可以设置共用系统剪贴板 if has('clipboard') if has('unnamedplus') " When possible use + register for copy-paste set clipboard=unnamed,unnamedplus else " On mac and Windows, use * register for copy-paste set clipboard=unnamed endif endif |