Support to disable mappings only for insert mode

If disable mappings only in normal mode.
let g:surround_no_insert_mappings = 1
This commit is contained in:
Takatoshi Matsumoto 2013-01-21 16:11:42 +09:00
parent 2cc734fd99
commit 02199ea008

View File

@ -567,11 +567,13 @@ if !exists("g:surround_no_mappings") || ! g:surround_no_mappings
nmap ySS <Plug>YSsurround
xmap S <Plug>VSurround
xmap gS <Plug>VgSurround
if !hasmapto("<Plug>Isurround","i") && "" == mapcheck("<C-S>","i")
imap <C-S> <Plug>Isurround
if !exists("g:surround_no_insert_mappings") || ! g:surround_no_insert_mappings
if !hasmapto("<Plug>Isurround","i") && "" == mapcheck("<C-S>","i")
imap <C-S> <Plug>Isurround
endif
imap <C-G>s <Plug>Isurround
imap <C-G>S <Plug>ISurround
endif
imap <C-G>s <Plug>Isurround
imap <C-G>S <Plug>ISurround
endif
" vim:set ft=vim sw=2 sts=2 et: