I would like to yank -
I would also like to paste it to my system clipboard so i will use '+' register for this.
can you suggest me possible way to do this?
If you are trying to yank c:\foo\bar\file.txt:94
when you are on line 94 of c:\foo\bar\file.txt
you can use the following statement to set the +
register to
<file_path>:<line_number>
:let @+=expand("%") . ':' . line(".")
expand("%")
- is the current file name
line(".")
- is the current line number
An example mapping is
nnoremap <leader>y :let @+=expand("%") . ':' . line(".")<CR>