Permalink
Browse files

Support to disable mappings only for insert mode

If disable mappings only in normal mode.
let g:surround_no_insert_mappings = 1
  • Loading branch information...
1 parent 2cc734f commit 02199ea0080d744ec76b79d74ce56d51d25cf7ae @ToQoz ToQoz committed Jan 21, 2013
Showing with 6 additions and 4 deletions.
  1. +6 −4 plugin/surround.vim
View
@@ -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:

0 comments on commit 02199ea

Please sign in to comment.