21 lines
909 B
VimL
21 lines
909 B
VimL
" Wayland clipboard provider that strips carriage returns (GTK3 issue).
|
|
" This is needed because currently there's an issue where GTK3 applications on
|
|
" Wayland contain carriage returns at the end of the lines (this is a root
|
|
" issue that needs to be fixed).
|
|
let g:clipboard = {
|
|
\ 'name': 'wayland-strip-carriage',
|
|
\ 'copy': {
|
|
\ '+': 'wl-copy --foreground --type text/plain --trim-newline',
|
|
\ '*': 'wl-copy --foreground --type text/plain --primary --trim-newline',
|
|
\ },
|
|
\ 'paste': {
|
|
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
|
|
\ '*': {-> systemlist('wl-paste --no-newline --primary | tr -d "\r"')},
|
|
\ },
|
|
\ 'cache_enabled': 1,
|
|
\ }
|
|
|
|
" Copy filenames
|
|
nnor <leader>yfp :let @+=expand("%:p")<CR> " Mnemonic: Yank File path
|
|
nnor <leader>yfn :let @+=expand("%")<CR> " Mnemonic: Yank File name
|