Skip to content

Instantly share code, notes, and snippets.

@exdeniz
Created May 22, 2020 02:41
Show Gist options
  • Save exdeniz/a1dbd94813b0101896b5aa084f75d24c to your computer and use it in GitHub Desktop.
Save exdeniz/a1dbd94813b0101896b5aa084f75d24c to your computer and use it in GitHub Desktop.
VIM and wayland with wl-clipboard fixed problem with pasting content from GTK3 with ^M at the end of lines
if !empty($WAYLAND_DISPLAY)
let g:clipboard = {
\ 'name': 'wayland-strip-carriage',
\ 'copy': {
\ '+': 'wl-copy --foreground --type text/plain',
\ '*': 'wl-copy --foreground --type text/plain --primary',
\ },
\ 'paste': {
\ '+': {-> systemlist('wl-paste --no-newline | tr -d "\r"')},
\ '*': {-> systemlist('wl-paste --no-newline --primary | tr -d "\r"')},
\ },
\ 'cache_enabled': 1,
\ }
endif
@exdeniz
Copy link
Author

exdeniz commented May 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment