Last active
November 28, 2019 03:50
-
-
Save ttdoda/a45cf0b462cdb74e887f7125165449c4 to your computer and use it in GitHub Desktop.
tmux使用時のvimでのBracketed Paste Mode有効化
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has('patch-8.0.0238') | |
if &term =~ "screen" | |
let &t_BE = "\e[?2004h" | |
let &t_BD = "\e[?2004l" | |
exec "set t_PS=\e[200~" | |
exec "set t_PE=\e[201~" | |
endif | |
else | |
if has('patch-8.0.0210') | |
set t_BE= | |
endif | |
if &term =~ "xterm" || &term =~ "screen" | |
function XTermPasteBegin(ret) | |
set paste | |
set pastetoggle=<Esc>[201~ | |
return a:ret | |
endfunction | |
let &t_ti .= "\e[?2004h" | |
let &t_te .= "\e[?2004l" | |
noremap <special> <expr> <Esc>[200~ XTermPasteBegin("0i") | |
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("") | |
vnoremap <special> <expr> <Esc>[200~ XTermPasteBegin("c") | |
cnoremap <special> <Esc>[200~ <nop> | |
cnoremap <special> <Esc>[201~ <nop> | |
endif | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment