blob: fce78147c299d8bb6712cd8a0150618dad39ebcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
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=
" Shortcut for Hugo TOML frontmatter
autocmd FileType markdown nnoremap <buffer> <C-f> i+++<CR>title = ""<CR>+++<CR><ESC>kk$i
|