Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Commit

Permalink
Define <Enter> and <Esc> default behavior for pumvisible()
Browse files Browse the repository at this point in the history
  • Loading branch information
Townk committed Jul 15, 2012
1 parent 41cce31 commit a435a9a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugin/AutoClose.vim
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function! s:DefineVariables()
\ 'AutoCloseSmartQuote': 1,
\ 'AutoCloseOn': 1,
\ 'AutoCloseSelectionWrapPrefix': '<LEADER>a',
\ 'AutoClosePumvisible': {},
\ 'AutoClosePumvisible': {"ENTER": "\<C-Y>", "ESC": "\<C-E>"},
\ 'AutoCloseExpandEnterOn': "{",
\ 'AutoCloseExpandSpace': 1,
\ }
Expand All @@ -379,9 +379,15 @@ function! s:DefineVariables()
" Movement keys used in the menu get mapped to themselves
" (Up/Down/PageUp/PageDown).
for key in s:movementKeys
if key == 'ENTER' || key == 'ESC'
continue
endif
let defaults['AutoClosePumvisible'][key] = ''
endfor
for key in s:pumMovementKeys
if key == 'ENTER' || key == 'ESC'
continue
endif
let defaults['AutoClosePumvisible'][key] = '<'.key.'>'
endfor

Expand Down

0 comments on commit a435a9a

Please sign in to comment.