From 5ffd36adcb5e2aa352609a3d4e005b3e99173442 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sun, 13 Oct 2019 13:47:17 +0200 Subject: Refactored 'splash' a lot & minor fixes in statusline --- vimrc-common | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'vimrc-common') diff --git a/vimrc-common b/vimrc-common index 77ebbdf..44dea70 100644 --- a/vimrc-common +++ b/vimrc-common @@ -201,6 +201,12 @@ if has("autocmd") " use the shada/viminfo file to return the cursor to where it was... autocmd BufReadPost * call setpos(".", getpos("'\"")) autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif + + " Workaround: Allows Vim to yank text within wayland + if $XDG_SESSION_TYPE ==# 'wayland' && !has('nvim') + autocmd TextYankPost * call system("wl-copy", getreg('+')) + endif + autocmd TextYankPost * echo '> text yanked to '. \ (get(v:event,'regname') == '' \ ? 'default register' @@ -350,11 +356,6 @@ augroup KEYBOARD_MAPPING if has('nvim') " only neovim... " shortcut \t opens a terminal in a horizontal split nnoremap t :new +terminal - else - " allow vim to yank in wayland - if $XDG_SESSION_TYPE ==# 'wayland' - xnoremap "+y y:call system("wl-copy", @") - endif endif augroup END -- cgit v1.2.3