首页 > 代码库 > vim - copy a word
vim - copy a word
1. http://stackoverflow.com/questions/7797068/copying-a-word-and-pasting-over-a-word
viwp - visually select a word, and paste over it by something in the clip.
2. How to copy/delete word under cursor in Vim
http://www.littletechtips.com/2011/05/how-to-copydelete-word-under-cursor-in.html
Assuming the cursor is at the first character of the word in command mode:
yw (y for yank and w for word)
Other ways of doing the same thing which are not as efficient:
vey (v starts visual mode. e tells vim to move to end of word. y yanks or copies the word. to delete replace y with x.)
if the cursor is somewhere in the middle of the word, add a "b" (before) the command:
byw / bvey
vim - copy a word
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。