Is there a way to open multiple files at once from vim?

后端 未结 3 1365
陌清茗
陌清茗 2021-02-01 02:59

When launching vim from the command line, I can do for example vim *.txt to open all text files in a directory at once.

For some reason, trying the same fro

相关标签:
3条回答
  • 2021-02-01 03:18

    Also, to add to the other answers, when you first start vim you can open multiple files at the same time, e.g.:

    vim *.txt
    
    0 讨论(0)
  • 2021-02-01 03:20

    It's done in two operations.

    Open all *.js files in as many vertical splits:

    :argadd *.js
    :argdo vs
    

    in horizontal splits:

    :argdo sp
    

    in tabs: 

    :argdo tabe
    
    0 讨论(0)
  • 2021-02-01 03:45

    This should work :

    :next *.txt
    
    0 讨论(0)
提交回复
热议问题