Fix #235 improve clear_select_mode_mappings behavior
This commit is contained in:
parent
578530edf1
commit
58a203c5dd
@ -49,12 +49,9 @@ function! neosnippet#mappings#_clear_select_mode_mappings() "{{{
|
|||||||
silent! smap
|
silent! smap
|
||||||
redir END
|
redir END
|
||||||
|
|
||||||
for line in map(filter(split(mappings, '\n'),
|
for map in map(filter(split(mappings, '\n'),
|
||||||
\ "v:val !~# '^s'"),
|
\ "v:val !~# '^s' && v:val !~ '^\\a*\\s*<\\S\\+>'"),
|
||||||
\ "substitute(v:val, '<NL>', '<C-J>', 'g')")
|
\ "matchstr(v:val, '^\\a*\\s*\\zs\\S\\+')")
|
||||||
let map = matchstr(line, '^\a*\s*\zs\S\+')
|
|
||||||
let map = substitute(map, '<NL>', '<C-j>', 'g')
|
|
||||||
|
|
||||||
silent! execute 'sunmap' map
|
silent! execute 'sunmap' map
|
||||||
silent! execute 'sunmap <buffer>' map
|
silent! execute 'sunmap <buffer>' map
|
||||||
endfor
|
endfor
|
||||||
|
Loading…
Reference in New Issue
Block a user