I am trying to add the following mapping into my vimrc:
nnoremap <leader>sv :source $MYVIMRC | filetype detect<cr>
This works in command mode, however, in the mapping I get:
E475: Invalid argument: detect
Why does it throw that error? What would be the proper way to get around it?
\|
or use<bar>
instead..per:h :bar
. But this shouldn't work from the command line either. Unescaped bar is always illegal "as an argument".nnoremap
is what I was thinking. I.e. unescaped bar doesn't ever work on the rhs of mappings, I believe.