4
10
2011
8

gvim 中的 vim 解决 复制/粘贴 格式混乱问题

我比较常用 xterm。每次在 vim 之间复制文本

为了不使粘贴的文本格式乱掉,保留原始格式

要先 关闭 行号,然后再用 Shift + 鼠标选区,选中要复制的文本

到要粘贴的文本处,使用 Shift - Insert / 鼠标中键,进行粘贴

若要,防止出现缩进格式乱掉的话,还要临时关闭 paste 选项

虽然定义了 快捷键 <F10>,但是每次来回切换也不是很方便

nnoremap <F10> :setlocal nu! list! paste!<CR>

为了,更方便些,只好安装 gvim,xterm 下 vim 可以直接使用

鼠标选择复制,不用再按住 Shift 了,复制 / 粘贴 格式也没有问题了!

 

Category: Vim | Tags: vim | Read Count: 3745
星空™ 说:
2011年4月13日 21:46

试试 ' " + c ' 复制 ' " + p ' 粘帖

星空™ 说:
2011年4月13日 21:48

试试 ' " + y' 复制 ' " + gp ' 粘帖

Avatar_small
if_else 说:
2011年4月13日 22:34

兄台,你说的这些快捷键,是对 vim 的还是 gvim 的

Avatar_small
依云 说:
2011年4月15日 07:27

@if_else: 很明显,他原来的 vim 没有 +xterm_clipboard 支持。

Avatar_small
依云 说:
2011年4月15日 07:28

好吧,原来你就是作者。。。

Godaddy Customer Ser 说:
2022年8月09日 06:02

GoDaddy is the largest domain registrar which brings various services to the people to bring their innovative ideas online. They sell domains that may easily searched from their search bar and does adds the services like Web / Domain Hosting, Godaddy Customer Service Word press Hosting, domain registration, eCommerce Solutions, Website Builder, SSL security certificates, Professional Email & Marketing, VPS, Microsoft 365 and more.

UBSE UK Highschool Q 说:
2022年8月17日 19:33

Uttarakhand Board 10th Question Paper 2023 Download, Uttarakhand Board of Secondary Education has been announced the New Question Paper of 10 Class in the month of January 2023. All the candidates who belong to Uttarakhand UBSE UK Highschool Question Paper 2023 PDF State they are looking for Board of Secondary Education class 10th examination Previous Question Paper 2023.

seo service london 说:
2024年1月14日 01:08

Excellent blog here! Also your site a lot up fast! What web host are you the usage of? Can I get your affiliate link in your host? I wish my site loaded up as quickly as yours lo


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com