Hacker News new | ask | show | jobs
by oblio 3573 days ago
I would move to Spacemacs if it had the possibility for using a tabbed interface similar to GVim's. Ideally something already built in, mature, and one which wouldn't need any hand holding during operation.

Vim's tabbed interface is quite good, it's basically Vim + a Vim-specific stacking window manager.

2 comments

There is such support in Spacemacs, it is called "spacemacs layouts" but the tab is visible only on demand while pressing `SPC l`. Eyebrowse is also integrated in Spacemacs layouts so you can have multiple sub-layouts for a given layouts. Note that Spacemacs layouts also achieve buffer isolation so you can have a layout restricted to project's buffers only, you can also create your own rules to automatically add buffers to some layouts (called custom layouts). Last you can persist Spacemacs layouts across sessions.
Layouts are fucking great. I have a moderately complex layout set up for my org-mode workflow (tasks list top left, agenda top center, notes file top right, kanban board bottom-left, and a scratch buffer bottom right), and they all load the same way every time. And I have project-specific layouts that get auto-loaded when I open that projectile project, and I have a general programming one as well. All of these took less than an hour to set up and work completely flawlessly.
I haven't used layouts much, but that sounds very useful.

Do you have your dotfiles somewhere online? Or could you put up the code needed for that setup in a gist/pastebin?

I don't have the dotfile up anywhere, but I can run you through the basics really quickly:

* SPC-l gives you the layouts micro-state, which allows you to do all of this. First, set up your layout however you'd like, then open up the micro-state and run the save-as command (SPC-l-S) and that will allow you to save the layout to a layouts file somewhere deep in the bowels of Spacemacs.

* When you're ready to use your layout, use SPC-l-L to load the layout from a file. Type its name (Helm is used, so you get narrowing/fuzzy-find for free) and the layout will load. Note that if you already had another layout loaded, it will load it to the next workspace (accessible through SPC-l-<workspace-number>).

* As for the org Kanban board, check here: http://www.draketo.de/light/english/free-software/el-kanban-... To add this to spacemacs, just open your .spacemacs file (SPC-f-e-d) and add `kanban` to your `dotspacemacs-additional-packages` list.

Spacemacs layouts are like having clippy in your text editor. "It looks like you're opening a tab, would you like to continue?", "What would you like to name this tab?". Vim just opens a tab.
There is vim-like tabs implementation for evil users: https://github.com/krisajenkins/evil-tabs .

I personally use emacs-native way, window-configuration-to-register: https://www.emacswiki.org/emacs/WindowsAndRegisters

(I see you've edited your comment meanwhile but I'll leave my comment here for reference)

I've seen some of these but I don't think any of them actually follow the tabbed interface paradigm:

* visible tab bar, preferably at the top and preferably style-able so that it doesn't look like it's out of Windows 3.11

* dynamic tab names based on file contents (in case of multiple buffers, show the name of the currently focused buffer), so that there's no need for manual tab name management

* tab navigation through shortcuts (open tab, close tab, move tab left/right, etc.)

Sorry for edit. I found and installed evil-tabs after replying and it's actually quite good.

It meets all the points you raised, and I agree with them - I prefer evil-tabs for that reason. Although I must that admit that evil-tabs only implements only crucial subset of all vim tabs features mentioned in http://vim.wikia.com/wiki/Using_tab_pages .

For future reference, evil-tabs is just skin over elscreen.

I created tmux-like keybindings, leveraging hydra and helm for some commands: https://gist.github.com/kozikow/58b46c45a2c24406dc7cde3f1861... .

In emacs, helm-buffer ("<SPC> b b" in spacemacs) has basically replaced tabs for me, and I haven't really missed them.