Hacker News new | ask | show | jobs
by krick 4074 days ago
Yeah, I'm skimming through docs right now. Yet what I find so far feels pretty unintuitive, because, as I said, vim was more about command mode to me, rather than default key bindings. That space key thing is quite unfortunate to me as well, because I'm used to binding spacebar to @q (works really well!).

However, `SPC b s` also doesn't what I was looking for. It opens a buffer, not a tab (which I'm not sure are supported in Spacemacs at all, which would be a critical hit). And it doesn't even look for them in the cwd, but does I-haven't-figured-out-what-yet instead.

If you are wondering why that SPC stuff isn't the equivalent to command-mode with ":" bound to SPC: commands are easy to define even in vim, they can have descriptive names due to their nature and I don't have to remember them, as I can use auto-complete! For example, I have :Rename and :Remove. Actually, I don't even remember if it's :Remove or :Delete, I just use autocompletion every time I need it and find out.

1 comments

> However, `SPC b s` also doesn't what I was looking for. It opens a buffer, not a tab

If you are looking for workspaces i.e. organizing buffers into logical group, use Perspective: https://github.com/syl20bnr/spacemacs/tree/master/contrib/pe....

> And it doesn't even look for them in the cwd, but does I-haven't-figured-out-what-yet instead.

As another commenter suggested, you can use :cd. However, you can use a better interactive interface and use "SPC f f" or "SPC f h". Spacemacs is, after all, Vim + Emacs.

Emacs has that kind of visual tabs but Spacemacs does not integrate it since it gets in the way more than being useful.

> If you are wondering why that SPC stuff isn't the equivalent to command-mode with ":" bound to SPC: commands are easy to define even in vim, they can have descriptive names due to their nature and I don't have to remember them, as I can use auto-complete! For example, I have :Rename and :Remove. Actually, I don't even remember if it's :Remove or :Delete, I just use autocompletion every time I need it and find out.

That kind of auto-complete is really bare. If you want something like that, try pressing "SPC :" or "Alt-x" in Spacemacs. You can search in any order you like, not prefix, i.e. if you look for command "list-package", either "list pa" or "pa list" gives you the command.

I mean, in Vim, to get help for a key binding, I have to type something like "Ctrl+W". Really? In Emacs, you get it by pressing "C-h k" then press the key binding you don't know which command is bound to it. You even get a cheatsheet like style in Emacs. For example, if you don't know what the commands in "SPC f" does, simply press "SPC f ?" and you get an interactive cheatsheet that you can easily narrow donw. Press "C-z" to open its description.

> it gets in the way more than being useful

Well, I didn't find how to make do without it yet, so I would rather stick with the word "critical" for now.

> "SPC :" or "Alt-x"

Oh, that's pretty neat. Actually, still not the same thing as command mode, because it seems there's some convention to chose the command first, and after pressing Enter passing any arguments interactively. Not that it's bad, but a bit different from how it's generally done in shells.

> I have to type something like "Ctrl+W". Really?

Really? Uhm, no, not really. Actually you have to type :map (as in "key map"), and if you don't know what to type you type in :h whatever.

> Well, I didn't find how to make do without it yet, so I would rather stick with the word "critical" for now.

What is "make do"? Do you mean running make? Btw, Spacemacs can do the same with the feature I listed above. The different is just it doesn't display the tab by default and only show you when you need it. That said, if you want to try, open .spacemacs file, search "dotspacemacs-configuration-layers" and add "perspectives" (without double quotes) below any layer there. Then, use "SPC L s" to switch between "tabs" (the default one is "@spacemacs". Enter a non-existent name and you have a new "tab". The "tabs" are collections of related buffers. If you create any new buffer, it is local in an active "tab" only.

"SPC L n" to go to next "tab". "SPC L p" to go to previous "tab". "SPC L k" to close current "tab". "SPC L a" to add a buffer to current "tab".

> Oh, that's pretty neat. Actually, still not the same thing as command mode, because it seems there's some convention to chose the command first, and after pressing Enter passing any arguments interactively. Not that it's bad, but a bit different from how it's generally done in shells.

Well you need to forgo Vim for awhile and concentrating on Spacemacs way. Then going back and compare.

> Really? Uhm, no, not really. Actually you have to type :map (as in "key map"), and if you don't know what to type you type in :h whatever.

That's not the same thing. Try pressing "Control-h k", then press "SPC b s" you will get a command that is bound to the key binding. If you want similar thing to ":map", then press "C-h b" to show the interactive cheatsheet. If you are in a major mode, it shows all the key bindings belong to that major mode first and foremost, than maps of other modes (such as minor modes) below.