Making splits visible only in current tab


#1

Just getting into package development - finally - and I have a question about splits.

if I issue a pane:splitDown(), I get a horizontal split and a duplicate of my current editorView in the new lower area. The new lower area is visible in all of my tabs.

What I’d like to do is split such that a new area is created (in the proper direction), is blank, and is only visible in the currently viewed tab.

My goal is to have output for a package show up in the bottom section of the current tab, but not be shared across all open tabs. In terms out output, it would be like the atom-script package.

Is that possible?

Pointers to existing projects that do this or the relevant documentation would be appreciated.

Thanks


#2

I would think that you would have to add an element to the active editor view. Doing what you’re asking with panes I don’t believe is currently possible … since panes are above the editor views and tabs in the element hierarchy.


#3

Thank you for the fast reply. I looked at the code for splitDown() on an editorView and it just calls splitDown() for the pane, so I figured I might be on the wrong track.

Is there a package out there that adds an element to the active editor view in a manner similar to what I’m trying to achieve?

Thanks again.


#4

Unfortunately, I don’t have an answer to that question. I don’t think so … but I don’t think it would be much different than adding a view to the workspace like the way the Find and Replace package does. It would just be a different target.


#5

I looked at this.

Find (in buffer and in project) shows up in all tabs, not just the tab you fired it off from. It uses workspaceView.prependToBottom, which uses panes.after(), so it’s working in a manner similar to splitBottom().

Hmmmm.


#6

Just to close the loop on this, this request is logged as an enhancement request in github (#672). I piled on and @nathansobo replied:

This is something we can address once our view system stabilizes in core. For now everything is so in flux that we’re not really ready to focus on this in core.

So, sounds like they’re aware of it and hope to do it at some point. Hopefully sooner rather than later! :smile: