$ curl cheat.sh/
" In order to evaluate an expression and pass it to a ex-mode command,
" you need to use the `execute` command. In your case, this works:

 :execute "m" line(".") - 2

" You can think of `execute` as a function taking a single variable `"m"
" line(".") - 2`. This variable is evaluated and then executed as a
" string in ex-mode.
" 
" For more help, see `:help execute`.
" 
" [Prince Goulash] [so/q/14347867] [cc by-sa 3.0]

$
Follow @igor_chubin cheat.sh