From bdb83427f5b7c8e45bbc1c08b809d6f226af2f9f Mon Sep 17 00:00:00 2001 From: Cihangir Akturk Date: Sat, 18 Nov 2017 22:18:45 +0300 Subject: [PATCH] Add include guard at the beginning of script No need to re-load the plugin if it has already been loaded. If you have a specific reason to do so, just do ':unlet g:loaded_bracketed_paste' and then try to reload it. Signed-off-by: Cihangir Akturk --- plugin/bracketed-paste.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/bracketed-paste.vim b/plugin/bracketed-paste.vim index 315a3cb..49517e7 100644 --- a/plugin/bracketed-paste.vim +++ b/plugin/bracketed-paste.vim @@ -9,6 +9,11 @@ " Docs on mapping fast escape codes in vim " http://vim.wikia.com/wiki/Mapping_fast_keycodes_in_terminal_Vim +if exists("g:loaded_bracketed_paste") + finish +endif +let g:loaded_bracketed_paste = 1 + let &t_ti .= "\[?2004h" let &t_te .= "\[?2004l"