diff --git a/plugin/supertab.vim b/plugin/supertab.vim index ba8f4dd..0370b2e 100644 --- a/plugin/supertab.vim +++ b/plugin/supertab.vim @@ -703,8 +703,8 @@ function! s:CaptureKeyPresses() " {{{ \ '': s:CaptureKeyMap(''), \ '': s:CaptureKeyMap(''), \ } - " TODO: use &keyword to get an accurate list of chars to map - for c in split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_', '.\zs') + " &keyword chars + for c in filter(map(range(33,126),'nr2char(v:val)'),'v:val =~ "\\k"') let existing = s:CaptureKeyMap(c) let b:captured[c] = existing exec 'imap ' . c . ' =CompletionReset("' . c . '")'