adjusted vimrc to improve text pasting experience while using vim in tmux
This commit is contained in:
@ -54,3 +54,32 @@ inoremap { {<CR>}<Esc>ko
|
|||||||
inoremap ( ()<Esc>i
|
inoremap ( ()<Esc>i
|
||||||
inoremap [ []<Esc>i
|
inoremap [ []<Esc>i
|
||||||
inoremap " ""<Esc>i
|
inoremap " ""<Esc>i
|
||||||
|
|
||||||
|
" set up bracketed paste
|
||||||
|
if !has('gui_running') && &term =~ '^\%(screen\|tmux\)'
|
||||||
|
" Better mouse support, see :help 'ttymouse'
|
||||||
|
set ttymouse=sgr
|
||||||
|
|
||||||
|
" Enable true colors, see :help xterm-true-color
|
||||||
|
let &termguicolors = v:true
|
||||||
|
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||||
|
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||||
|
|
||||||
|
" Enable bracketed paste mode, see :help xterm-bracketed-paste
|
||||||
|
let &t_BE = "\<Esc>[?2004h"
|
||||||
|
let &t_BD = "\<Esc>[?2004l"
|
||||||
|
let &t_PS = "\<Esc>[200~"
|
||||||
|
let &t_PE = "\<Esc>[201~"
|
||||||
|
|
||||||
|
" Enable focus event tracking, see :help xterm-focus-event
|
||||||
|
let &t_fe = "\<Esc>[?1004h"
|
||||||
|
let &t_fd = "\<Esc>[?1004l"
|
||||||
|
execute "set <FocusGained>=\<Esc>[I"
|
||||||
|
execute "set <FocusLost>=\<Esc>[O"
|
||||||
|
|
||||||
|
" Enable modified arrow keys, see :help arrow_modifiers
|
||||||
|
execute "silent! set <xUp>=\<Esc>[@;*A"
|
||||||
|
execute "silent! set <xDown>=\<Esc>[@;*B"
|
||||||
|
execute "silent! set <xRight>=\<Esc>[@;*C"
|
||||||
|
execute "silent! set <xLeft>=\<Esc>[@;*D"
|
||||||
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user