码迷,mamicode.com
首页 > 系统相关 > 详细

vim - copy a word

时间:2016-12-02 14:18:20      阅读:208      评论:0      收藏:0      [点我收藏+]

标签:com   tar   let   start   something   tip   which   mod   cursor   

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

标签:com   tar   let   start   something   tip   which   mod   cursor   

原文地址:http://www.cnblogs.com/cnblogist/p/6125352.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!