RE: How to copy - word under cursor and filename with full path toclipboard.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

RE: How to copy - word under cursor and filename with full path toclipboard.

Sanjeev Sapre
Thanks a lot. It works fine and solved my requirement.

Regards
SanjeevSapre
KPIT Cummins Infosystems Limited
Tel:  +91-20-5652 5000 extn 2704
 

-----Original Message-----
From: Jürgen Krämer [mailto:[hidden email]]
Sent: Tuesday, June 28, 2005 12:54 PM
To: vim mailing list
Subject: Re: How to copy - word under cursor and filename with full path toclipboard.


Hi,

Sanjeev Sapre wrote:
>
> I am looking for help on how to copy
>
> 1. Word under cursor

  nmap <F4> :let @* = expand('<cword>')<cr>

> 2. Current file name with full path to clipboard.

  nmap <F5> :let @* = expand('%:p')<cr>

> I would preferably map this to certain keys which will be handy.

Regards,
Jürgen

--
Jürgen Krämer                              Softwareentwicklung
HABEL GmbH & Co. KG                        mailto:[hidden email]
Hinteres Öschle 2                          Tel: +49 / 74 61 / 93 53 - 15
78604 Rietheim-Weilheim                    Fax: +49 / 74 61 / 93 53 - 99