I understand that in order to execute multiple command in one line, for example save and execute pdflatex, I can do the following.
:w | !pdflatex %:t
Note that the %:t gives you the current file name (without path). This code works fine in Vim. Now, if I want to map the whole thing above to, say ctrl+shift+F6, I'd like to be able to do the following
:nnoremap <C-S-F6> :w | !pdflatex %:t<CR>
But this doesn't work, and gives me the following error.
:!pdflatex paper.tex<CR>
/bin/bash: -c: line 0: syntax error near unexpected token `newline'
/bin/bash: -c: line 0: `pdflatex paper.tex<CR>'
Does this mean that I can't map ctrl+shift+F6 to the desired function, save and execute pdflatex? What can I do to get around this?