Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (17 sloc) 0.6 kb
" map.vim
" @Author: Tom Link (mailto:micathom AT gmail com?subject=[vim])
" @Website:
" @License: GPL (see
" @Created: 2009-08-23.
" @Last Change: 2009-08-23.
" @Revision: 0.0.4
let s:save_cpo = &cpo
set cpo&vim
" If |pumvisible()| is true, return "\<c-y>". Otherwise return a:key.
" For use in maps like: >
" imap <expr> <cr> tlib#map#PumAccept("\<cr>")
function! tlib#map#PumAccept(key) "{{{3
return pumvisible() ? "\<c-y>" : a:key
let &cpo = s:save_cpo
unlet s:save_cpo
Jump to Line
Something went wrong with that request. Please try again.