Skip to content

Difficult to bring back code buffer pane #469

@xiaotian

Description

@xiaotian

I use dap-ui's standard layout :

left stack is watch/stack/bp/scope
bottom is console and the control ui(icon/buttons).
remaining (top right) is my source buffer pane.

This works reasonably well, but if I accidentally close the source buf, then I am in a very bad situation and can't bring back the code buf pane easily. I have to jump through the following hoops:

  1. switch focus to that icon/control plan at bottom left. (this is the only pane that allow me to open my source buf as a split :( )
  2. :split # - this open my buf as a split on top of the icon/control pane, at this point, the code pane is back but the layout is all messed up.
  3. require("dapui").toggle({ reset = true }) this will close all dapui panes
  4. require("dapui").toggle({ reset = true }) this will bring back the console pane at right position. note you cannot just do 3 and 4, otherwise you end up with an additional watch pane at the code pane position.

I have tried many different ways(use stack frame, neotree, :e command, etc), none worked except this one, mostly because once the source buf pane is closed, there is no pane on which a buffer can be opened.

There should be an easier way to restore the layout, or bring back the code buffer pane.
Any easy way or magic I can bring back the source buffer pane? I am losing my sanity over this...

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions