首页 > 代码库 > vim - Putting the current file on the Windows clipboard

vim - Putting the current file on the Windows clipboard

http://vim.wikia.com/wiki/VimTip432

command! Copyfile let @*=substitute(expand("%:p"), ‘/‘, ‘\‘, ‘g‘)
command! Copyfile let @+=substitute(expand("%:p"), ‘/‘, ‘\‘, ‘g‘)
This copies the entire path and filename of the current file (with any slashes replaced with backslashes) onto the clipboard.

vim - Putting the current file on the Windows clipboard