-
Notifications
You must be signed in to change notification settings - Fork 250
Move window operations #513
Conversation
@coolwanglu this is cool. I'd really like to have some specs for this before merging, but I'm not sure where to point you for examples. Stand by. @nathansobo do you have any advise for testing this? Also, is there any way to accomplish this without constructing a |
@maxbrunsfeld Right, |
@maxbrunsfeld For testing, you should probably just use I wonder if you could achieve this via normal API's by creating a new pane in the desired location, moving all the items, then destroying the old pane. Any reason that wouldn't work? |
@nathansobo The problem is exactly to create a pane at the desired position. Say the current layout is something like
and the result after moving should be
In this case I don't know how to create the new Pane which is a sliding of the old vertical PaneAxis. |
Ah, I see. You're right. This definitely expands the surface area of our panes API. @maxbrunsfeld I think we should think through how we could extend our official API to support this before merging this into an officially maintained package. Do you agree? @coolwanglu if you'd like to think through a more ideal official API for this we could entertain a PR on atom/atom. What if we exposed the axes as part of the API and provided |
@nathansobo Right, if Also we need functions to retrieve the root pane/paneaxis, and to check whether it is a pane or axis. |
@coolwanglu And if you call Would you be interested in opening a PR on master with these changes? If you agree about the naming change, we would need to leave the old |
@nathansobo I'm afraid that I might not have enough time recently. I will come back later and implement this if nobody has done so. |
@coolwanglu Cool, thanks a lot! |
Any hope on getting the calls into Atom? If not, is there a downside to merging this as-is for now? It can always be updated when Atom provides the calls. Also, if I can get an answer on how to write tests for #723, I'd volunteer to write tests for this one too. They look like they'd be pretty similar. |
For reference. Although I need to investigate further, the approach I finally succeeded to achieve this feature is to copy whole original root PaneAxis and its child and use this copied paneAxis as child of newPaneAxis. So, as same reason, I don't think this PR work as-is, does someone tried this PR? Here is memo after struggling to implement this feature. copying original Root paneAxis copyRoot using copyPaneAxis recursively. This feature is one of top feature I used to use in Vim. |
Yeah, not working well would be a pretty big downside! I haven't tried this patch -- it didn't look like it was very mergeable yet. I notice the lack of move-window operations every day... guess it's time to get off my butt and set up paner. (edit: works great! but this functionality still belongs in vim-mode). |
I tried to tested if this patch still works for the latest version of
So I guess the better way is to implement this in Atom as Maybe this PR should be closed? |
What API are you saying integrated? By the way when you created this PR? Could you split pane for pane which is moved to |
@t9md For example, this one: https://github.com/coolwanglu/vim-mode/blob/4aba8f61eb768968fc7e74f767efa41cca63a757/keymaps/vim-mode.cson#L84 I'm not sure about your question, I don't remember if I have tested that or not. Sorry. I guess it's best to implement this directly in Atom, we don't even need new APIs that way. |
@coolwanglu Thanks. |
As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the vim-mode-plus package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions! |
Implement the commands like
^WH
.I found it not easy to write spec about moving panes, I'm not familiar with the atom API, especially those about creating and identifying panes, any suggestions?