Loading ...
Sorry, an error occurred while loading the content.

59954Re: How to copy - word under cursor and filename with full path to clipboard.

Expand Messages
  • Tim Chase
    Jun 28, 2005
      >>1. Word under cursor
      > nmap <F4> :let @* = expand('<cword>')<cr>

      In addition to Jurgen's suggestion, you can modify that to

      nmap <f4> "*yiw


      nmap <f4> "*yiW

      if you want the non-whitespace definition of a "word". Both are
      a bit shorter. Though thinking about it, they may also move the
      cursor to the beginning of the word, and I think Jurgen's
      solution keeps the cursor position. More fodder for play :)

    • Show all 4 messages in this topic