In the following nnoremap
:
nnoremap <expr> <leader>3 ToggleColors()
func ToggleColors()
if g:colors_name == "OceanicNext"
return ":colorscheme TextMate"
else
return ":colorscheme OceanicNext"
endfunc
I am able to get the function to return the proper command to 'enter', however, I have to actually press return for it to run. If I try entering either:
nnoremap <expr> <leader>3 ToggleColors()<CR>
I get:
E15: Invalid expression: ToggleColors() ^M
Or if I try doing:
return ":colorscheme TextMate <CR>"
It enters a literal and doesn't actually hit enter:
What would be the proper way to 'hit enter' at the end of the mapping so I don't have to do it manually?
<cr>
to in the return value directly?