Created
August 20, 2017 12:58
-
-
Save mrcnc/ae878a84a8a80241894938c87ec2b61e to your computer and use it in GitHub Desktop.
vimrc setting to automatically enable/disable paste mode
This file contains hidden or 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
| " automatically set paste mode | |
| let &t_SI .= "\<Esc>[?2004h" | |
| let &t_EI .= "\<Esc>[?2004l" | |
| inoremap <special> <expr> <Esc>[200~ XTermPasteBegin() | |
| function! XTermPasteBegin() | |
| set pastetoggle=<Esc>[201~ | |
| set paste | |
| return "" | |
| endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment