网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站设计 > gVim
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 106.111.142.4
Old 2016-06-07, 04:32 PM
Chromo Chromo is offline
初级会员
 
Join Date: 2012-03-23
Posts: 1
Chromo 现在声名狼藉
Default vi中全选的命令或者快捷方式

网上有两种说法比较多:“:1,$y”和 “dG”

但是我查到有资料显示:1,$y是全部复制,不是全选

dG这是删除光标所在行到最后一行的内容(包括光标所在行的内容)

还有一个命令是 ggVG
解释是:
gg 让光标移到首行,在vim才有效,vi中无效
V 是进入Visual(可视)模式
G 光标移到最后一行
选中内容以后就可以其他的操作了,比如:
d 删除选中内容
y 复制选中内容到0号寄存器
"+y 复制选中内容到+寄存器,也就是系统的剪贴板,供其他程序用
全部删除:按esc后,然后dG
全部复制:按esc后,然后ggyG
全选高亮显示:按esc后,然后ggvG或者ggVG

要复制到别的地方,用 "+y 来复制,注意是三个字符。
gg"+yG
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 3 (0 members and 3 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 07:15 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.