4 ms·
Just tried it and despite some people here claiming vim-style support is really full I found it pretty unusable for me, the vim user. Which is a pity, as I find
by krick 12y ago
Just tried it and despite some people here claiming vim-style support is really full I found it pretty unusable for me, the vim user. Which is a pity, as I find vim lacking many features emacs has (or allows to implement easily), but am struggling to switch.
My workflow starts from command-mode and is heavily dependent on it. It's far more crucial than any hjkl stuff and whatever. The first thing I tried was :tabnew. "Uknown command: `tabnew`." Then I tried to use :cd and while it has such a command it works in some weird way which I couldn't figure out how to use on the first attempt. I guess it actually has everything I need, but I probably entered something wrong and suddenly ended up using scp, lol.
While editing some text file without any real purpose I surprisingly didn't find anything that would be working in an unexpected way yet. Maybe it's worth trying it out.
- tuhdo 12y agoMaybe you should learn the Spacemacs way (which is the combination of Vim and Emacs) rather than expecting it the Vim way. To create new buffer, `SPC b s` and enter new buffer name. To change directory and get into it, use `SPC f f` or `SPC f h` depends on your preference.
- krick 12y agoYeah, 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.
- tuhdo 12y ago> 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/perspectives#key-bindings 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.
- krick 12y ago> 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.
- chrisgw 12y ago":" runs Emacs functions. Some commands from Vim have been added, but not all of them. If a function with the same name as a Vim command already exists in Emacs, it's not replaced. I'd imagine replacing the default Emacs functions could break things in weird ways. :cd runs the Emacs cd function which behaves differently than Vim's :cd. To get the equivalent of :tabnew, you'd have to use :buffer [name] and give the new buffer (Emacs's equivalent of tabs) a name.
- krick 12y agoOh, I see, thank you. As I understand buffer name isn't the same thing as file path/name. So I can't really open file by pasting (Ctrl-r +) it path anyway, can I? Also, I only understood how to switch between buffers using that separate screen, not like "next/previous tab", and there isn't any panel that would show which tabs are opened now. But I think that's solvable, at least.
- chrisgw 12y agoYou'd have to either use :find-file or :e (Ctrl-r +). You can switch between buffers with :switch-to-buffer, :ido-switch-buffer, :b, :bn, and :bp. It's not the same as tabs though.
- gsb 12y agoTo get :cd to behave more like vim, you could add https://github.com/gbarta/evil-noautochdir https://github.com/gbarta/evil-noautochdir which in addition to behaving like :set noautochdir, also allows :cd to take an argument the vim way.