diff options
Diffstat (limited to 'vimrc')
| -rw-r--r-- | vimrc | 50 |
1 files changed, 29 insertions, 21 deletions
| @@ -1,29 +1,37 @@ | |||
| 1 | exec ':source '.fnamemodify($MYVIMRC,':h').'/'.'vimrc-common' | 1 | exec ':source '.fnamemodify($MYVIMRC,':h').'/'.'vimrc-common' |
| 2 | set packpath+=pack/vim | 2 | set packpath+=pack/submodules |
| 3 | 3 | ||
| 4 | set ttymouse=xterm2 | ||
| 5 | set term=xterm-256color " usually a good choice, install ncurses and use `toe` to see all available choices | ||
| 6 | set ttybuiltin | " use internal termcaps, because these are more stable | ||
| 7 | set ttyscroll=100 | " improves speed for terminal vim, incompatible with nvim | ||
| 8 | set ttyfast | " improves speed for terminal vim (incompatible with nvim) | ||
| 9 | set restorescreen | " restores the console after exiting vim (intentionally not in nvim) | ||
| 10 | |||
| 11 | " because file names rarely have equal signs, but many different configuration | ||
| 12 | " file formats use that, we want to exclude the sign from the pattern | ||
| 13 | set isfname-== | 4 | set isfname-== |
| 5 | set modeline | ||
| 14 | 6 | ||
| 15 | " autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") | 7 | set signcolumn=yes |
| 16 | " autocmd VimLeave * call system("xsel -ib", getreg('+')) | 8 | set foldcolumn=1 |
| 17 | autocmd VimLeave * call system('echo ' . shellescape(getreg('+')) . ' | xclip -selection clipboard') | ||
| 18 | 9 | ||
| 19 | 10 | ||
| 20 | " scripts from the default vim installation, which do not get loaded by default, but are useful. | 11 | if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY)) |
| 21 | if filereadable($VIMRUNTIME.'/macros/editexisting.vim') | 12 | autocmd TextYankPost * call system("wl-copy", get(v:event, 'regcontents')) |
| 22 | packadd! editexisting | 13 | nnoremap p :silent put =system('wl-paste')<CR> |
| 14 | nnoremap P :silent put! =system('wl-paste')<CR> | ||
| 23 | endif | 15 | endif |
| 24 | 16 | ||
| 25 | " load default plugin 'matchit' to allow % to jump between tags | 17 | |
| 26 | if filereadable($VIMRUNTIME.'/macros/matchit.vim') | 18 | set shadafile="/tmp/shada" |
| 27 | packadd! matchit | 19 | |
| 28 | endif | 20 | " neovide specific |
| 29 | "======================================================================================================================= | 21 | set guifont=monospace:h11:b |
| 22 | " :#e-subpixelantialias:#h-full | ||
| 23 | let g:neovide_cursor_animation_length=0.03 | ||
| 24 | let g:neovide_cursor_trail_size=0.8 | ||
| 25 | let g:neovide_scroll_animation_length = 0.05 | ||
| 26 | let g:neovide_transparency = 0.9 | ||
| 27 | |||
| 28 | " scripts from the default vim installation, which do not get loaded by default, but are useful. | ||
| 29 | " if filereadable($VIMRUNTIME.'/macros/editexisting.vim') | ||
| 30 | " packadd! editexisting | ||
| 31 | " endif | ||
| 32 | " | ||
| 33 | " " load default plugin 'matchit' to allow % to jump between tags | ||
| 34 | " if filereadable($VIMRUNTIME.'/macros/matchit.vim') | ||
| 35 | " packadd! matchit | ||
| 36 | " endif | ||
| 37 | " | ||
