括弧のマッチングを複数のウィンドウに強制的に表示できますか?


9

深くネストされた異種構造の長いリストを含むソースファイルがあります。構造が長いので、次のことを行います。

  1. :splitコマンドを使用して、画面を2つに分割します。
  2. 一方のウィンドウを下にスクロールし、もう一方のウィンドウを上にスクロールします。ウィンドウ1のカーソルが括弧の上にあり、他の括弧が他のウィンドウに表示されている場合、他のウィンドウの他の括弧が強調表示されます(同じウィンドウに表示されていたのと同じように)。

どうすれば2番目のステップを実行できますか?

回答:


9

I don't think there's any way to do this, however a better approach in this case would be to leverage vim's folding to fold away part of the code between the structures you're interested in and that can make it a lot more easy for you to visually see the matching brackets.

You can also use % to jump between the start & end parenthesis too to get a fair idea of where's what.


Thank you for your reply. I think the % is useful but not ideal in my case since the opening brackets and closing brackets of my structure are not on the same column and jumping around with the cursor causes the whole screen to change. I'm exploring folding at the moment to see if it could be useful, but I will ask about that in a separate post as I have encountered some problems with it (which I think could be solved).
John Sonderson

As for the feature I requested in my post, perhaps I should submit a feature request.
John Sonderson
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.