diff options
Diffstat (limited to 'user/vim')
-rw-r--r-- | user/vim/vimrc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/user/vim/vimrc b/user/vim/vimrc index b65deb0..952f863 100644 --- a/user/vim/vimrc +++ b/user/vim/vimrc @@ -1,4 +1,23 @@ syntax on +" Don't break words in the middle. +set linebreak + +" Enable easy copying between different vim instances. +set clipboard=unnamed + +" Wayland clipboard workaround (see https://github.com/vim/vim/issues/5157). +if !empty($WAYLAND_DISPLAY) && executable('wl-copy') && executable('wl-paste') + " enable focus reporting + let &t_fe = "\<Esc>[?1004h" + let &t_fd = "\<Esc>[?1004l" + + augroup wl-clipboard + autocmd! + autocmd FocusLost * if @" != '' | call system('wl-copy --trim-newline', @") | endif + autocmd FocusGained * let @" = system('wl-paste -n') + augroup END +endif + " Enable pasting with middle mouse click in insert mode. set mouse= |