The goal is to create a mapping that will:
- create a mapping for the user -->
remapdoes the trick
- that gets the current expression under the cursor -->
expand('<cexpr>')will do the trick
- put this into the command line, so the user can adjust as necessary
What I've tried so far:
:let exp = expand('<cexpr>')-> gets the value, for example "my_expr"
nnoremap = :Evaluate<Space> expand('<cexpr>')-> writes that text in there instead of resolving it
nnoremap <expr> = 'Evaluate '. expand('<cexpr>') . ' = '--> changes to visual mode
should pre-set the ex command to
:Evaluate my_expr so the user can adjust the expression before pressing enter.