I used to use \"+y to copy text to system\'s clipboard, but it doesn\'t work in vim of Bash on Windows.
Below are mappings
cy, cyy and cY (=Clipboard Yank) that copy, respectively, the given text object, line(s), rest of the line from the cursor position to the clipboard, andY that copies the visual selection to the clipboard,independent of whether Vim is started in WSL or not.
nnoremap cy "+y
nnoremap (mgu) m`_
onoremap (gu) g_
nnoremap (ggg) g``
nmap cyy '(mgu)cy' . v:count1 . '(gu)' . '(ggg)'
nmap cY cy(gu)
xnoremap Y "+y
if has('unix') && executable('clip.exe')
" From :help map-operator
function! SendToClip(type, ...) abort
if a:0
" Visual mode
normal! gv"+y
elseif a:type ==# 'line'
normal! '[V']"+y
elseif a:type ==# 'char'
normal! `[v`]"+y
endif
call system('clip.exe', @+)
endfunction
nnoremap cy :set operatorfunc=SendToClipg@
xnoremap Y :call SendToClip(visualmode(),1)
endif