Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] tabs as workspaces #440

Closed
szbergeron opened this issue Jul 15, 2019 · 8 comments
Closed

[feature request] tabs as workspaces #440

szbergeron opened this issue Jul 15, 2019 · 8 comments
Labels
A-workspace Area: Overall UX, editor layout, tabs/groups/splits etc. enhancement New feature or request

Comments

@szbergeron
Copy link

In standard (neo)vim, tabs act as workspaces and buffers work within splits. Since with Oni 2 tabs act more similarly to buffers in standard (neo)vim, an analogue to vim "tabs" that act as workspaces would be appreciated.

Use case description: I open a single instance of a documentation buffer that I want to have be distraction free. I want to edit code, but don't want to have to keep creating and destroying a split to edit possibly related code. I open a new workspace that I can use to see multiple points in that source code file, or even multiple source files, but want to maintain that original distraction free documentation workspace. Ideally this is all in the same session, so ctrl-p and rg update properly and I don't have to worry if I open the same file in multiple workspaces, as it should be the same buffer every time.

@bryphe
Copy link
Member

bryphe commented Jul 15, 2019

Yes, I've been thinking about this too! We're missing the 'tab' equivalent in 'vim'/'neovim' - the ability to store / persist a set of windows splits and cycle between them.

This is something I'd consider tackling for the next milestone (the VSCode-integration one) - I was considering adding the following:

  • New ex cmds - wsnew, ws drop, ws split wsfirst, wslast, wsnext, wsprev - to handle creating, deleting, and navigating between workspaces. (wsdrop` would go to the workspace containing a buffer
  • Commands surfaced in the <Control+Shift+P> command palette
  • Showing the list of workspaces in the file explorer pane (as a separate tree)
  • Persistence in splits - saving the set of splits per-workspace, and loading them on open.
  • Each workspace could optionally be associated with a directory (:cd would change the active directory for the workspace, and be persisted)

@bryphe bryphe added the enhancement New feature or request label Jul 15, 2019
@nwaywood
Copy link

nwaywood commented Aug 1, 2019

@bryphe so happy to hear you are thinking about solutions in this space!!!

I would like to reference the issue that I made in the oni 1 repo about this same topic, I think there was some good discussion there.

onivim/oni#1582

In particular, this comment is my opinion on how it could work onivim/oni#1582 (comment) (which if I understand your comment above correctly is pretty similar?)

@bryphe
Copy link
Member

bryphe commented Aug 1, 2019

Hey @nwaywood good to see you here! Thanks for linking the issue - my comment was really inspired by the discussion in that thread #1582. Sorry I didn't properly attribute!

It's something that's been on my mind that we weren't able to get to in v1... I hope we can do it right in v2!

@hoschi
Copy link

hoschi commented Aug 2, 2019

I miss the 'splits-in-tabs' from vim in the pre-alpha. This workspaces idea should then be "the best of both worlds" as @nwaywood said, I like it!

@zweglarz
Copy link

It'd be nice to have a config option to have tabs/splits behave as they do in Vim. Coming from Vim and the Oni V1, I find it painful to not be able to navigate tabs like I'm used to, and it is one of the biggest reasons I didn't switch to using VSCode with the vim plugin.

@escorponox
Copy link
Contributor

Not having vim tabs would be a deal breaker to most people coming from vim in my opinion. We could have a kind of session auto-save/load instead of introducing that workspace concept.

@yunti
Copy link

yunti commented Sep 10, 2019

Interestingly intellij has a tab less way of working, with quick switching between files for the current split which is more like working with vim. This is even their recommended way of working -
https://youtu.be/o-T40MRwzdA?t=556

@glennsl glennsl added the A-workspace Area: Overall UX, editor layout, tabs/groups/splits etc. label Nov 18, 2019
@bryphe
Copy link
Member

bryphe commented Aug 20, 2020

FYI - this set of PRs #2013 #2030 #2032 added tabs - using these configuration settings:

  "oni.layout.layoutTabPosition": "top",
  "workbench.editor.showTabs": false

mimics the Vim UI (no 'window tabs', and the 'vim tabs' on top) - and you can use the following tab commands:

  • tabnew, tabedit, gT, gt, tabp, tabn, etc

So I believe this is addressed now with that work - but please feel free to log issues for missing scenarios or bugs 👍

A few follow-up issues: #2233 #2232 #2230 #2251

@bryphe bryphe closed this as completed Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-workspace Area: Overall UX, editor layout, tabs/groups/splits etc. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants