diff options
Diffstat (limited to 'vimrc-common')
-rw-r--r-- | vimrc-common | 11 |
1 files changed, 6 insertions, 5 deletions
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") | |||
201 | " use the shada/viminfo file to return the cursor to where it was... | 201 | " use the shada/viminfo file to return the cursor to where it was... |
202 | autocmd BufReadPost * call setpos(".", getpos("'\"")) | 202 | autocmd BufReadPost * call setpos(".", getpos("'\"")) |
203 | autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif | 203 | autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif |
204 | |||
205 | " Workaround: Allows Vim to yank text within wayland | ||
206 | if $XDG_SESSION_TYPE ==# 'wayland' && !has('nvim') | ||
207 | autocmd TextYankPost * call system("wl-copy", getreg('+')) | ||
208 | endif | ||
209 | |||
204 | autocmd TextYankPost * echo '> text yanked to '. | 210 | autocmd TextYankPost * echo '> text yanked to '. |
205 | \ (get(v:event,'regname') == '' | 211 | \ (get(v:event,'regname') == '' |
206 | \ ? 'default register' | 212 | \ ? 'default register' |
@@ -350,11 +356,6 @@ augroup KEYBOARD_MAPPING | |||
350 | if has('nvim') " only neovim... | 356 | if has('nvim') " only neovim... |
351 | " shortcut \t opens a terminal in a horizontal split | 357 | " shortcut \t opens a terminal in a horizontal split |
352 | nnoremap <leader>t :new +terminal<CR> | 358 | nnoremap <leader>t :new +terminal<CR> |
353 | else | ||
354 | " allow vim to yank in wayland | ||
355 | if $XDG_SESSION_TYPE ==# 'wayland' | ||
356 | xnoremap "+y y:call system("wl-copy", @")<cr> | ||
357 | endif | ||
358 | endif | 359 | endif |
359 | augroup END | 360 | augroup END |
360 | 361 | ||