search

Home  >  Q&A  >  body text

vim - Why do both windows change to the same file name?

Enter gvim.

from the shortcut key of the graphical interface.

Then enter the command line and enter vs

At this time, two windows on the left and right appeared.
I entered w test.html in the left window.
Why are the windows on the left and right ordered as test.html?

滿天的星座滿天的星座2743 days ago657

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 16:36:04

    First :vs 的意思的水平分割窗口, 见 :h vs。如果 :vs 不带参数的话,默认是在新分割的窗口中打开当前 buffer 的文件,也就是你之前的 test.html。你试一下 :vs ~/.vimrc, the .vimrc file will be opened in a newly divided window.

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 16:36:04

    :vs表示水平分割,也就是会左右分屏,一遍用法是:vs xxx文件,然后两个文件分别在左右两个屏幕,但如果不输入xxx文件,默认:vsThe current file will be opened, that is, the current file will be displayed in the left and right windows respectively

    reply
    0
  • Cancelreply