开发者

VIM copy a full word that contains a . (dot)

i noticed that that if a word contains . (dot), then ywi will only copy until the dot. yet I want to the entire word copied

whole.word 开发者_JAVA技巧should copy whole.word, and not just whole


I tried in gVim and looks like either yE or yW will work for you.


Oh, sorry. you want to copy. Maybe using yWi would work?


Did you try dW ? I think that should ignore the punctuation.


yE

(putting nothing here to reach the character limit)


If there's a space after the word you'd like to copy, you could type yt<space> which would *yank unt*il space. If there's no space after the word, then yank until the separating character.


You can either use yE or yiW. I prefer the latter, even though the it involves an additional keystroke, because it will produce the same result no matter where your cursor is positioned on the whole.word string. In vim's terminology, the w/b/e/ge commands each operate on a 'word', whereas the uppercased commands (W/B/E/gE) operate on a 'WORD'. You can read up on the differences by running :help word in Vim.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜