vim添加复制(crtl+c),粘贴(ctrl+v)ctrl+A 等快捷键
1 在 /usr/share/vim/vimrc文件中添加 source $VIMRUNTIME/mswin.vim
2 mswin.vim位置在 /usr/share/vim/vim72/目录下面
3 下面是mswin.vim文件的目录,没有这个文件的可以自己创建这个文件
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
" Set options and add mapping such that Vim behaves a lot like MS-Windows " " Maintainer: Bram Moolenaar <Bram@vim.org> " Last change: 2006 Apr 02 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin finish endif " set the 'cpoptions' to its Vim default if 1 " only do this when compiled with expression evaluation let s:save_cpo = &cpoptions endif set cpo&vim " set 'selection', 'selectmode', 'mousemodel' and 'keymodel' for MS-Windows behave mswin " backspace and cursor keys wrap to previous/next line set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap <BS> d " CTRL-X and SHIFT-Del are Cut vnoremap <C-X> "+x vnoremap <S-Del> "+x " CTRL-C and CTRL-Insert are Copy vnoremap <C-C> "+y vnoremap <C-Insert> "+y " CTRL-V and SHIFT-Insert are Paste map <C-V> "+gP map <S-Insert> "+gP cmap <C-V> <C-R>+ cmap <S-Insert> <C-R>+ " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they " were characterwise instead. " Uses the paste.vim autoload script. exe 'inoremap <script> <C-V>' paste#paste_cmd['i'] exe 'vnoremap <script> <C-V>' paste#paste_cmd['v'] imap <S-Insert> <C-V> vmap <S-Insert> <C-V> " Use CTRL-Q to do what CTRL-V used to do noremap <C-Q> <C-V> " Use CTRL-S for saving, also in Insert mode noremap <C-S> :update<CR> vnoremap <C-S> <C-C>:update<CR> inoremap <C-S> <C-O>:update<CR> " For CTRL-V to work autoselect must be off. " On Unix we have two selections, autoselect can be used. if !has("unix") set guioptions-=a endif " CTRL-Z is Undo; not in cmdline though noremap <C-Z> u inoremap <C-Z> <C-O>u " CTRL-Y is Redo (although not repeat); not in cmdline though noremap <C-Y> <C-R> inoremap <C-Y> <C-O><C-R> " Alt-Space is System menu if has("gui") noremap <M-Space> :simalt ~<CR> inoremap <M-Space> <C-O>:simalt ~<CR> cnoremap <M-Space> <C-C>:simalt ~<CR> endif " CTRL-A is Select all noremap <C-A> gggH<C-O>G inoremap <C-A> <C-O>gg<C-O>gH<C-O>G cnoremap <C-A> <C-C>gggH<C-O>G onoremap <C-A> <C-C>gggH<C-O>G snoremap <C-A> <C-C>gggH<C-O>G xnoremap <C-A> <C-C>ggVG " CTRL-Tab is Next window noremap <C-Tab> <C-W>w inoremap <C-Tab> <C-O><C-W>w cnoremap <C-Tab> <C-C><C-W>w onoremap <C-Tab> <C-C><C-W>w " CTRL-F4 is Close window noremap <C-F4> <C-W>c inoremap <C-F4> <C-O><C-W>c cnoremap <C-F4> <C-C><C-W>c onoremap <C-F4> <C-C><C-W>c " restore 'cpoptions' set cpo& if 1 let &cpoptions = s:save_cpo unlet s:save_cpo endif |
原文:https://www.cnblogs.com/Ph-one/p/5620894.html
vim添加复制(crtl+c),粘贴(ctrl+v)ctrl+A 等快捷键的更多相关文章
- Spring Tool Suite4(sts)复制粘贴卡顿(ctrl+v, ctrl+c)、按住ctrl也很卡
最近在看<Spring in Action, Fifth Edition>,下载了Spring Tool Suite4,在使用的过程中发现了一些问题: 只要在复制粘贴(ctrl+c, ct ...
- 国产网络测试仪MiniSMB - 利用Ctrl+c/Ctrl+v/Ctrl+a快速编辑数据流
国产网络测试仪MiniSMB(www.minismb.com)是复刻smartbits的IP网络性能测试工具,是一款专门用于测试智能路由器,网络交换机的性能和稳定性的软硬件相结合的工具.可以通过此以太 ...
- 转载:vim的复制,删除,粘贴,块操作以及快速替换功能
掌握如下命令有什么好办法,我可以告诉你唯手熟尔!!多看多练对于VIM而言,复制,删除,粘贴的操作应该是非常多的.这次也做一个总结,关于处理VIM下的复制,删除,粘贴等操作.学会使用帮助文件,命令的帮助 ...
- 【xshell】xshell设置快捷键 设置Ctrl+C Ctrl+V快捷键为复制粘贴
在使用xshell的时候,总是不能顺手的进行复制粘贴的操作. 那能不能设置xhsell的快捷键呢? 点击工具--->选项---> 选择 键盘和鼠标 选项卡--->点击编辑----&g ...
- Winform 使用热键功能实现Ctrl+C和Ctrl+V复制粘贴功能
当我们使用winform控件的时候,会发现这些控件(比如Label)不支持Ctrl+c 复制和Ctrl+v 快捷键复制粘贴功能,如果我们需要实现这个功能改怎么做呢? 1. 首先我们创建一个winfor ...
- 电脑突然使用不了复制粘贴快捷键,Ctrl+C和Ctrl+V没用
今天不知道怎么回事,在复制代码的时候突然用不了Ctrl+C和Ctrl+V了 刚开始我还以为是eclipse出问题,然后我在idea中是可以复制 和 粘贴的,然后我又打开文本编辑器notepad++,发 ...
- Eclipse使用Ctrl+C和Ctrl+V复制粘贴时总是卡顿
Eclipse使用Ctrl+C和Ctrl+V复制粘贴时总是卡顿,解决办法: 更改打开代码超链接按键Ctrl为Alt: Window -> Preferences -> General -& ...
- c# TextBox只允许输入数字,禁用右键粘贴,允许Ctrl+v粘贴数字
TextBox只允许输入数字,最大长度为10 //TextBox.ShortcutsEnabled为false 禁止右键和Ctrl+v private void txtNumber_KeyPress( ...
- vim的复制粘贴小结
vim帮助文档里与粘贴板有关的内容如下: vim有12个粘贴板,分别是0.1.2.….9.a.“.+:用:reg命令可以查看各个粘贴板里的内容.在vim中简单用y只是复制到“(双引号)粘贴板里,同样用 ...
随机推荐
- 【Spark】RDD操作具体解释3——键值型Transformation算子
Transformation处理的数据为Key-Value形式的算子大致能够分为:输入分区与输出分区一对一.聚集.连接操作. 输入分区与输出分区一对一 mapValues mapValues:针对(K ...
- SQL Server死锁排查经历 -基于SqlProfiler
提到sql server,想必最让人头疼的当属锁机制了.在默认的read committed隔离模式下,连最基本的select操作都要申请各种粒度的锁,而且在读取数据过程中会不断有锁升级.转化.在非 ...
- openssh入门
ssh (secure shell),ssh协议支持登录及文件的传输加密防止数据截留! 01.下载 https://www.ssh.com/ ...
- iOS-仿支付宝刮刮乐效果
概述 仿支付宝刮刮乐效果, 可以按照自己需求更改展示刮出来的效果的view(即刮开后刮刮乐效果展示) 详细 代码下载:http://www.demodashi.com/demo/10673.html ...
- C#利用反射机制调用dll
利用反射进行动态加载和调用. Assembly ass=Assembly.LoadFrom(DllPath); //利用dll的路径加载,同时将此程序集所依赖的程序集加载进来,需后辍名.dll Ass ...
- Redis的Docker镜像
原文地址:https://hub.docker.com/_/redis/ Pull Command docker pull redis Short Description Redis is an op ...
- .NET压缩图片保存
需求: 需要将用户后买的图片批量下载打包压缩,并且分不同的文件夹(因:购买了多个用户的图片情况) 文章中用到了一个第三方的类库,Nuget下载 SharpZipLib 目前用的 1.1的版本 效果: ...
- Android github上开源项目、酷炫的交互动画和视觉效果地址集合
Android上开源的酷炫的交互动画和视觉效果:http://blog.csdn.net/u013278099/article/details/50323689 Awesome-android-ui: ...
- C++拷贝函数的小结,关于变量的作用域等---ShinePans
#include <iostream> using namespace std; class circle { private: double r0; public: circle(dou ...
- MongoDB索引原理
转自:http://www.mongoing.com/archives/2797 为什么需要索引? 当你抱怨MongoDB集合查询效率低的时候,可能你就需要考虑使用索引了,为了方便后续介绍,先科普下M ...