On Sep 9, 6:12 am, Jürgen Krämer <[email protected]> wrote: > Hi, > > Dotan Cohen wrote: > > Is there a quick way to copy the name of the variable / function under > > the cursor (respecting word boundaries) to the clipboard without > > having to meticulously highlight and copy it in the regular fashion? > > "+yiw >
Yes, this will do exactly what you asked. It doesn't tell you much, though. For the details, you should know that "iw" is a text object. Text objects are a very powerful feature of Vim, which you can read about at :help text-objects. You can used them after operators like d, y, c, gU, and the like, or in visual mode. The other part of the answer, "+y, is selecting the clipboard register with "+ and then starting a yank operation. See :help registers for details. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
