5 ms·
> I tried Emacs/Spacemacs and for example, there's no decent tabbed interface. I mean a real tabbed interface, at least as good as Vim's. The answers I got on t
by josteink 10y ago
> I tried Emacs/Spacemacs and for example, there's no decent tabbed interface. I mean a real tabbed interface, at least as good as Vim's. The answers I got on this topic ranged from: "you're not going to need it" (how do you know what I need?) to "use this random package which kind of provides a limited subset of the tabbed interface UX" to "write it yourself" (...).
I'd like to offer a different explanation, which I think it much more truthful and reflects the Emacs way(tm).
In Emacs everything (and I mean everything) is represented by the same type of primitives: Buffers made out of text. Every interaction with such a text-buffer is represented as lisp-code implementing an Emacs mode.
This is the core of Emacs. Everything in Emacs must build on this. No exceptions. And that's incredibly powerful.
Because of these "limitations" it means everything (and I mean everything) in Emacs can be processed using the same primitives, the same functions and the same keys.
There's no magic buttons, or drop-down lists, or special UI elements exempt from this.
I can search/grep for text in any buffer. I can recursively grep for results in my grep-result buffer. I can navigate these search results, the same way I would navigate a code-document. I can enable spell-check in any mode I like (like Git commit-mode). Etc etc.
It also means that any customization I've done to any part of Emacs, I can apply to any third party extension as well. It means I can customize and interact with a extension which extends another extension. There's almost no limits to what you can do with these simple but powerful primitives.
And all that in a simple and uniform way. Everything at your finger-tips. Both as a Emacs-package developer and an Emacs-user.
Once you get used to it, it's really a captivating thing and everything else starts feeling wrong.
If you want to make a tabbed interface... How are you going to represent that using those primitives? How will that work?
How will you make sure you tab-line/row stays in place and is exempt from other rules which governs the current buffer and the Emacs mode it runs (not to mention the user-customized rules for this mode)?
I'm not saying it can't be done. I'm just saying it wouldn't be very Emacsy, and it's probably not a trivial thing to implement either. Especially when you consider that all your code also needs to work in a terminal. Emacs should be able to work 100% in a SSH session too, you know. At least for me, that's one of it's many selling points :)
So non-trivial and not very Emascy. That doesn't sound like anything which is going to get lots of developer-time. Neither core nor third-party.
- oblio 10y agoVim has (more or less) the same buffer paradigm. And it still has a proper tabbed interface. It can be done, it's just that there's no interest in the community or from the developers. I can understand that, on the other hand such things make sure that a large number of people won't ever enter the Emacs community, for good or bad. If you don't believe me about the popularity of the tabbed interface, I present: - the addition of tabs to Vim - the #1 feature request for Visual Studio Code, now implemented, tabs
- wtbob 10y agoSo you mean GUI tabs I guess? How would one even begin to display hundreds of tabs on a screen? I hate that Firefox doesn't make it as easy to switch tabs as emacs makes it easy to switch buffers.
- redacted 10y agoIIRC vim's tabs are just views into buffers - you don't need to have a tab per buffer at all. So you can switch between tabs, or between buffers in a tab etc.
- gkya 10y agoTabs are an inefficient representation of Emacs buffers, as they are not mere views into files, and sometimes not even intended for the user to see. That said, there are packages out there if you really want them. Or you implement it. There are the facilities. But the default Emacs is an API for other packages, and plugging in tabs would have implications on most of the elisp out there. Yet another option is not to use emacs if it does not fit your requirements and preferences.
- gnuvince 10y agoI typically open Emacs when I boot my laptop, and close it when I shut down (which happens only every few weeks); this is typical of a lot of Emacs users. In those few weeks, I open hundreds of buffers and I rarely close them: my buffer list contains all the TeX files from the paper I'm working on, the code files of a couple different projects, many one-off files, IRC buffers, twitter buffers, etc. Yet, switching to the buffer I want is easy, fast, and painless. Using ivy (helm or ido-flx are good too), I can quickly switch to any buffer by typing part of its name. This paradigm would be totally impossible (or at the very least, most impractical) if I had one tab-per-buffer. I think if Vim or Visual Studio Code had a similar quick way of switching between buffers, people would be less reliant on tabs. As for Emacs, it seems like a waste of time and effort to implement a feature that most Emacs users would not use.