外部拷贝内容粘贴到终端vim中,内容缺失
Tofloor
poster avatar
andycong
deepin
2020-01-02 06:01
Author
比如,我在浏览器拷贝一段文字:   deb [by-hash=force] http://mirrors.aliyun.com/deepin lion main contrib non-free
在Terminal中用vim打开文件。右键“paste”, 结果如下:


总是少了第一个字母。

如果外部拷贝包含中, 在粘贴到vim编辑器中,那就结果更出乎意料。

我记得在ubuntu下没有这个的问题。 还是我自己操作不当?


Reply Favorite View the author
All Replies
avatar
jzc
deepin
2020-01-02 06:56
#1
vim配置
新建  ~/.vimrc

set clipboard=unnamed
Reply View the author
avatar
andycong
deepin
2020-01-05 04:31
#2
https://bbs.deepin.org/post/187598
vim配置
新建  ~/.vimrc

可以可以,感谢
原来是粘贴板的问题。
Reply View the author
avatar
ghostry
deepin
2020-01-06 01:29
#3
有图形干嘛用vi,

我只在没图形时候用vi
Reply View the author
avatar
deepinuser17
deepin
2020-01-06 10:08
#4
https://bbs.deepin.org/post/187598
有图形干嘛用vi,

我只在没图形时候用vi

熟悉了vi以后,使用vi编辑文档是非常高效的。 而且无需担心是系统是文本,还是图形界面。
Reply View the author
avatar
ghostry
deepin
2020-01-06 17:53
#5
https://bbs.deepin.org/post/187598
熟悉了vi以后,使用vi编辑文档是非常高效的。 而且无需担心是系统是文本,还是图形界面。
...

哈哈,这倒是,就是学习成本挺高的.
Reply View the author
avatar
151******18
deepin
2020-01-06 21:39
#6
使用加号剪切板,vim下:
  1. "+p
Copy the Code
Reply View the author
avatar
151******18
deepin
2020-01-06 21:40
#7
本帖最后由 sunowsir 于 2020-1-6 13:54 编辑

使用右键的粘贴等同于一个字符一个字符的输入,当你粘贴很长的文本,会发现需要复制很长时间,而且格式会乱掉。vim的剪切板是独立的,不和系统用一个,在vim中若想要与系统剪切板沟通,需要使用加号系统剪切板。
二楼朋友发的配置的意思是取消vim的独立剪切板,让vim与系统共用一个剪切板。
Reply View the author
avatar
观摩
deepin
2020-01-06 22:34
#8
如果是缺失前几个字符,那说明粘贴前没有进入编辑模式。如果是缺失后面的,可能就是 8楼 伙计说的原因。
Reply View the author