Comments (11)
wintabs stores a list of "local" buffers to each window, so it's unlikely I can re-use any code from undoquit. That being said, undo closing buffer/window/tab sounds like a great feature to have. I'll look into it when I have time.
from vim-wintabs.
Thank you for considering the feature, and thanks for this wonderful plugin.
from vim-wintabs.
Did you give any thought to this? Have you found the need for such a feature in your day to day use? Once you get use to undoquit, it's hard to loose the feature.
from vim-wintabs.
I was thinking that 90% of the value could be gotten from only supporting the use case of one undo level - the ability to revert the most recently closed wintab, regardless of which window it was closed from.
from vim-wintabs.
I've thought about this and would implement it as undo closing buffers without considering window and vimtab configurations, just like what you suggested. I haven't got the time yet, but will do it in the next round of clean ups (a few bugs and documentation).
from vim-wintabs.
This is implemented in the last commit, please check it out!
from vim-wintabs.
Very cool can’t wait to check it out
from vim-wintabs.
I think the only thing remaining here is to track which "approximate window" the tab was closed from. Was it the last open tab in a window that resulted in the window closing? If so, then a new window should probably be opened (it's hard to restore the exact window position of course but some simple setting could configure how new windows are opened if not instructed specifically (vert/horiz)).
If it was closed from a window that is still open, then it should probably reappear in that window it was removed from.
Either way, this is still a nice feature as it is.
from vim-wintabs.
Opening in original window is doable, it requires giving windows unique ids, which isn't too hard. It however is a bit too jumpy to my taste: e.g. I really hate how Chrome undoes closed tabs inside different windows. I'll think about what's the best next step here after some other features.
from vim-wintabs.
I think one compromise is to only "Undo Close" within the same tab. WintabsUndo
would then undo the closing of the most recent buffer/window in the currently focused tab. That's not as jarring as jumping to a completely different tab to undo the close. Jumping to another tab would feel like jumping to another Chrome window to undo the close.
If you can accept that, then you might want to keep track of the most recently closed buffer on a per-tab basis.
from vim-wintabs.
I decided not doing window scoped undo for now as it involves some unnecessarily challenging edge cases. I added some commands to move buffer across windows. That combined with current undo should be able to satisfy most use cases. I'm closing this but please open another issue if these two are not enough for your workflow.
from vim-wintabs.
Related Issues (20)
- When restoring from Vim session, buffers from other tabs are copied into the active tab HOT 3
- [Feature request] Close tabs (buffers) to the left/right like chrome HOT 2
- Support displaying vimtabs when statusline display is enabled HOT 2
- Setting g:wintabs_display = 'none' followed by :WintabsRefresh does nothing HOT 2
- Allow overriding buf_label specifically HOT 1
- Request: Ability to click on statusline buffers HOT 1
- If two files are opened only first is displayed in wintabs HOT 3
- Option to disable tabline if only one buffer is open HOT 1
- After closing a tab, the tabbing order doesn't flow correctly
- How to exit vim after closing the last Wintabs?
- Vim error with switchbuf="useopen" in vimdiff
- Colors and styles support HOT 2
- :mkview followed by :loadview makes a buffer tab disappear
- split windows and buffers (when using g:wintabs_display = 'tabline')
- [question] change buffer status line colours HOT 1
- Buffer number HOT 1
- Strange marks in tabline HOT 1
- buffers for each tab rather than window
- persistence of folds between tabs (or buffers in a window)
- Does this project support bufferline.nvim?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-wintabs.