Multiple commands on same line

后端 未结 7 1984
予麋鹿
予麋鹿 2020-12-02 04:33

I\'ve been trying to find something that will let me run multiple commands on the same line in Vim, akin to using semicolons to separate commands in *nix systems or &a

相关标签:
7条回答
  • 2020-12-02 05:18

    Put <CR> (Carriage Return/Enter) between and after commands. For example:

    map <F5> :w<CR>:!make && ./run<CR>
    

    Don't use | because:

    • Some commands have problems if you use | after them

    • | does not work consistently in configuration files, see :help map_bar

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