What is difference between Vim's clipboard “unnamed” and “unnamedplus” settings?
2016-05-27 08:36
471 查看
http://stackoverflow.com/questions/30691466/what-is-difference-between-vims-clipboard-unnamed-and-unnamedplus-settings
What is the difference between these 2 settings?
set clipboard=unnamed
set clipboard=unnamedplus
Which one should I use in order to have multi-platform .vimrc?
On Mac OS X and Windows, the * and + registers both point to the system clipboard so unnamed and unnamedplus have the same effect: the unnamed register is synchronized with the system clipboard.
On Linux, you have essentially two clipboards: one is pretty much the same as in the other OSes (Ctrl+C and Ctrl+V in other programs, mapped to register + in Vim), the other is the “selection” clipboard (mapped to register * in Vim).
Using only unnamedplus on Linux, Windows and Mac OS X allows you to:
Ctrl+C in other programs and put in Vim with p on all three platforms,
yank in Vim with y and Ctrl+V in other programs on all three platforms.
If you also want to use Linux’s “selection” clipboard, you will also need unnamed.
Here is a cross-platform value:
set clipboard^=unnamed,unnamedplus
Reference:
:h ‘clipboard’
(and follow the tags)
What is the difference between these 2 settings?
set clipboard=unnamed
set clipboard=unnamedplus
Which one should I use in order to have multi-platform .vimrc?
On Mac OS X and Windows, the * and + registers both point to the system clipboard so unnamed and unnamedplus have the same effect: the unnamed register is synchronized with the system clipboard.
On Linux, you have essentially two clipboards: one is pretty much the same as in the other OSes (Ctrl+C and Ctrl+V in other programs, mapped to register + in Vim), the other is the “selection” clipboard (mapped to register * in Vim).
Using only unnamedplus on Linux, Windows and Mac OS X allows you to:
Ctrl+C in other programs and put in Vim with p on all three platforms,
yank in Vim with y and Ctrl+V in other programs on all three platforms.
If you also want to use Linux’s “selection” clipboard, you will also need unnamed.
Here is a cross-platform value:
set clipboard^=unnamed,unnamedplus
Reference:
:h ‘clipboard’
(and follow the tags)
相关文章推荐
- VIM编译器显示TAB和TAB转换为空格
- 菜鸟说给菜鸟听之VIM--入门篇(1)
- cygwin下vim方向键不好用的解决方案
- 安装使用Ubuntu之vim必须知道的细节
- Ruby学习笔记二帮助生成Vim添加代码头的代码
- PHP工程师VIM配置分享
- ruby开发vim插件小结
- VIM中设置php自动缩进为4个空格的方法详解
- Vim命令高级用法
- linux Vim基本操作方法
- 手把手教你将Vim改装成一个IDE编程环境(图文) 吴垠
- 搭建Vim为自定义的PHP开发工具的一些技巧
- 使用python开发vim插件及心得分享
- 两个命令把 Vim 打造成 Python IDE的方法
- linux系统中使用Vim删除偶数行或者奇数行
- Python开发如何在ubuntu 15.10 上配置vim
- Mac 配置VIM插件 提示"E492:Not an editor command:^M"
- vim配置文件
- VIM中空格和TAB的替换
- Vim编辑器快捷键