Mapping one key to multiple commands in vim

前端 未结 1 810
忘了有多久
忘了有多久 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 actually works (it probably won't in CLI Vim), you must escape the bar or use instead:

    :nnoremap  :up \| !pdflatex %:t
    :nnoremap  :up  !pdflatex %:t
    

    See :help map_bar.

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