当前位置:网站首页>Vim and copy and paste from the outside (don't need to install the plugin)
Vim and copy and paste from the outside (don't need to install the plugin)
2022-08-11 02:24:00 【Xinchen Ocean】
The default vim does not have the function of interacting with the system clipboard and vim;
To complete the copying of the content in vim to the system clipboard, vim support is required +clipboard;
Enter in the terminal: vim --version | grep clipboard to view;
See the symbols in front of clipboard and xterm_clipboard;
plus(+) for support- Minus sign (-) means not supported
![]()
Paste the windows content into vim;
After ctrl+c under windows, in command line mode, press Shift+Inset to paste;
Copy and paste the content in vim to another place;
The content related to the pasteboard in the vim help document is as follows:
1. There are 12 pasteboards in vim, which are 0, 1, 2, ..., 9, a, ", +; use :regThe command can view the contents of each pasteboard. In vim, simply use y to copy to the “ (double quotation mark) pasteboard, and the same paste with p is also the paste.The contents of the board;

2. To copy the content of vim to a pasteboard, you need to exit the editing mode, enter the command line mode, select the content to be copied, and then press "Ny to complete the copy, where Nis the pasteboard number (note that you need to press the double quotation mark, then press the pasteboard number and finally press y), for example, to copy the content to the pasteboard a, select the content and press "ay.Points need to be explained:
- "Number pasteboard (temporary pasteboard) is special. Press y to copy it to this pasteboard, and press p to paste the content in this pasteboard;
- + pasteboard is the system pasteboard. After copying the content to the pasteboard with "+y, you can use Ctrl+V to paste it into other documents (such as firefox, gedit), and the same is true., to copy the content copied with Ctrl+C or right-click in other places to vim, you need to press "+p in normal mode;
3. To paste the contents of a clipboard in vim, you need to exit the editing mode. Press "Np in the normal mode, where N is the number of the pasteboard. As mentioned above, you can press"5p pastes the content in the No. 5 pasteboard, or you can press "+p to paste the content in the system global pasteboard.
边栏推荐
猜你喜欢

测试3年,开口就要25k?面试完最多给15k...

解决vim与外界的复制粘贴(不用安装插件)

学军中学推理社2017届招新试题

117. 本地开发好的 SAP UI5 应用部署到 ABAP 服务器时,中文字符变成乱码的原因分析和解决方案

多线程之ThreadPoolExecutor

Section 4-6 of the first week of the second lesson: Appreciation of medical prognosis cases + homework analysis

88Q2110 access C45 phy address through C22

想进阿里?先来搞懂一下分布式事务

一次简单的 JVM 调优,拿去写到简历里

FPGA learning column (xinlinx) serial communication -
随机推荐
google搜索技巧——程序员推荐
FPGA learning column (xinlinx) serial communication -
【C 数据存储详解】(1)——深度剖析整形数据在内存中的存储
13.cuBLAS开发指南中文版--cuBLAS中的Level-1函数copy()和dot()
2022制冷与空调设备运行操作考试试题模拟考试平台操作
[4G/5G/6G专题基础-154]: 5G无线准入控制RAC(Radio Admission Control)
Oops novice template Framework project guide
nvidia-smi详解
单面PCB布线阻抗的工程设计
Please talk about for...in and for...of in JS (below)
《如何戒掉坏习惯》读书笔记
花甲的思考
How to create an index when sql uses where and groupby?
基于 HPSO 与多核 LSSVM 的网络入侵检测
shell [stdin/stdout/stderr][重定向]
关于地图GIS开发事项的一次实践整理(上)
压力能变成动力
BUU刷题记录
数据存储全方案----详解持久化技术
【PHP】入门知识