vim - how do I set a shortcut?

159 views Asked by At

I'm trying to follow the instructions for configuring NeoComplete

The config example is this:

inoremap <expr><C-l>     neocomplete#complete_common_string()

I'm assuming this means, press Ctrl-L to accept the first completion. It doesn't work.

Can someone explain the <expr><C-l> bit?

1

There are 1 answers

2
Kent On

if you used <expr> mapping, it means, the string returned by given expression will be {rhs} mapping.

E.g. you have a function return a string abc, then with nnoremap <expr>, your mapping will do same in normal mode pressing abc