Open xiamaz opened 5 years ago
@xiamaz
Solve part of my issue. But only this still printed a string instead of call the ncm2_ultisnips#expand_or()
function.
So, I put this <buffer>
argument on <CR>
mapping, like:
inoremap <silent> <buffer> <expr> <CR> ncm2_ultisnips#expand_or("\<CR>", 'n')
And works like a charm.
So, thanks for your tip!
I noticed that when I'm inside a project folder, such as a Rails project, the "print string" behavior still persists. What I did was delegate the mapping to a autocmd
rule.
autocmd BufNewFile,BufRead * inoremap <silent> <buffer> <expr> <cr> ncm2_ultisnips#expand_or("\<CR>", 'n')
Works great to me. :+1:
Current vimrc example will not behave as expected.
Expected behavior
Expansions are triggered with enter key. Tab key will scroll through completion list if configured to do so.
Actual behavior
Expansions are triggered with tab key. Enter key will do nothing.
Fix
In the current example one line is commented out. This needs to be activated to work.