2016-10-21 8 views
4

私は垂直分割をしているので、の左ウィンドウを閉じるにはカーソルがの右ウィンドウにあるにあるのですか? 私はCtrl-w wと次のウィンドウに行くことができると知っているし、それを閉じるが、より速い方法かもしれない。 ありがとうVimの次のウィンドウを閉じる

答えて

8

:-qまたは:-q!は仕事をする必要があります。 :h CTRL-W_qによると

:q[uit] 
:{count}q[uit] 
... 
       If [count] is greater than the last window number the last 
       window will be closed: 
        :1quit " quit the first window 
        :$quit " quit the last window 
        :9quit " quit the last window 
          " if there are less than 9 windows opened 
        :-quit " quit the previews window 
        :+quit " quit the next window 
        :+2quit " quit the second next window 

私はあなたが2つだけ、開閉可能な窓、キーの組み合わせCtrl-w o(またはコマンド:only)を持っている場合は上記previews windowprevious window ...

3

をお読みください推測が閉じます次の(そして他のウィンドウのみ)ウィンドウ。

一般に、Ctrl-w oは、現在のウィンドウを除くすべてのウィンドウを閉じます。

+0

最初の答えの後、私は ':h CTRL-W'とタイプしました。ありがとう、私はそのトリックも見つけました。 – isar

関連する問題