How to effectively work with multiple files in Vim

前端 未结 28 2833
甜味超标
甜味超标 2020-11-28 00:18

I\'ve started using Vim to develop Perl scripts and am starting to find it very powerful.

One thing I like is to be able to open multiple files at once with:

<
28条回答
  •  忘掉有多难
    2020-11-28 00:24

    In my and other many vim users, the best option is to,

    • Open the file using,

    :e file_name.extension

    And then just Ctrl + 6 to change to the last buffer. Or, you can always press

    :ls to list the buffer and then change the buffer using b followed by the buffer number.

    • We make a vertical or horizontal split using

    :vsp for vertical split

    :sp for horizantal split

    And then to change the working split.

    You can ofcourse edit any file in any number of splits.

提交回复
热议问题