Wednesday, January 12, 2022

Re: setting clipboard register by vim9cmd or noremapping

Sorry solved as this :

nnoremap          cp    :vim9cmd @* = expand('%:p')<CR>

or from vim command line :
:vim9cmd @* = expand('%:p')
Le mercredi 12 janvier 2022 à 14:18:09 UTC+1, Ni Va a écrit :
Hi,

Just would like to set clipboard register value to path of my current opened file.

but it seems to fail trying these :

  :vim9cmd @"* = expand('%:p')

or in $MYVIMRC
  nnoremap          cp    :vim9cmd @"* = expand('%:p')<CR>

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/33e539d9-6fc9-40a7-a84e-4ee6628ba552n%40googlegroups.com.

No comments:

Post a Comment