If you execute this
cnoremap <expr> <silent> <C-S> execute(':cnoremap <c-s> ctrl-s')
and then hit /Ctrl-sCtrl-sCtrl-sCtrl-s, you'll see the search command be populated by /ctrl-sctrl-sctrl-s
.
Good.
But what's special in <space>
not to work like that?
After executing this
cnoremap <expr> <silent> <C-S> execute(':cnoremap <space> space')
as soon as I hit /Ctrl-s, I get E385: Search hit BOTTOM without match for: ^S
.
To get the thing to work, I have to alter the command above to look like this
cnoremap <expr> <silent> <C-S> execute(':cnoremap <lt>space> space')
Why is that?