Mapping one key to multiple commands in vim

前端 未结 1 802
忘了有多久
忘了有多久 2020-12-30 20:23

I understand that in order to execute multiple command in one line, for example save and execute pdflatex, I can do the following.

:w | !pdflate         


        
相关标签:
1条回答
  • 2020-12-30 21:11

    Assuming <C-S-F6> actually works (it probably won't in CLI Vim), you must escape the bar or use <bar> instead:

    :nnoremap <C-S-F6> :up \| !pdflatex %:t<CR>
    :nnoremap <C-S-F6> :up <bar> !pdflatex %:t<CR>
    

    See :help map_bar.

    0 讨论(0)
提交回复
热议问题