Created
April 20, 2011 06:13
-
-
Save marlun/930480 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! MyCR() | |
echom 'MyCR()' | |
" XPTinfo() returns a list if snippet is active. | |
if type(XPTinfo()) == type([]) | |
echom 1 | |
XPTcrash | |
return '' | |
elseif pumvisible() | |
echom 2 | |
return "\<C-Y>" | |
elseif delimitMate#WithinEmptyPair() | |
echom 3 | |
return "\<C-R>=delimitMate#ExpandReturn()\<CR>" | |
else | |
echom 4 | |
return "\<C-G>u\<CR>" | |
endif | |
endfunction | |
inoremap <expr> <CR> MyCR() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment