3 ms·
I absolutely want to love Spacemacs, it's beautiful, highly functional and relatively easy to transition to as a Vim user. Every time I try it though I just ca
by beefsack 10y ago
I absolutely want to love Spacemacs, it's beautiful, highly functional and relatively easy to transition to as a Vim user.
Every time I try it though I just can't get indentation detection to work at all. For the amount of functionality built in I'd really expect that to be built in or easy to configure. Having Emacs control indentation with the TAB key drives me insane too, I'd just like to control it myself.
For developers who work over a range of different projects with different indentation styles, that sort of functionality is essential. dtrt-indent seems like it should solve the detection issue but I've had very little success getting it to reliably work.
- easytiger 10y ago> Having Emacs control indentation with the TAB key drives me insane too, I'd just like to control it myself. Thats what the space key is for. Also emacs controlling tabs is the liberating genius of python dev in emacs.
- deuill 10y agoFWIW, I've had better mileage out of `dtrt-indent` by increasing the `dtrt-indent-min-quality` option to `90.0`, which has the heuristics a tad more strict in choosing the correct indentation. However, there are still cases where the wrong choice is made and fixing is extremely annoying. I've been using Spacemacs for about 3 months now, moving from Sublime Text, and while the initial experience was mixed, there are things that I just couldn't do without (project management felt weird at first, but now feels seamless, the fact you can edit over SSH transparently etc). There are still many pain points, such as the sub-standard multiple cursor implementation (with `evil-mc`, `iedit` isn't much better) or the fragmented and incomplete tagging implementation (GNU Global doesn't support everything and generating isn't transparent, though `dumb-jump` is being implemented which may help). However, I feel that both Emacs and Spacemacs have very strong foundations and extremely vibrant communities, and am confident a lot of the pain points (at least the ones that aren't architecture-related) will be fixed given enough time. Spacemacs is well on its way for a new major release, which should fix a few things.
- beefsack 10y agoYour `dtrt-indent-min-quality` tip has essentially solved my indentation detection issues, thanks! I've never really been a fan of multiple cursors, Vim users tend to use macros to solve this. It's a highly valuable thing to learn and practise.
- spdy 10y agoFor python development i started to really like the tab jumping in spacemacs always sets me in the right position based on level. Came from vim as well and i wont go back. Spacemacs just fuses both vim / emacs world together seamlessly. All important keystrokes are the same across languages which is nice. Cant see me leaving the emacs-evil world anytime soon.
- _asummers 10y agoFYI: You can take over the indent hooks to make them do whatever you want, in the major programming modes. For a while in js2-mode, I had my own indent hook to get around something it was doing weirdly. More importantly you can of course rebind or unbind tab (or all indent functions!) to your heart's content. Through a combo of custom indent functions and .dir-locals.el files in each project, I've been able to navigate between space/tabs projects with different indent styles.
- methehack 10y agoThis is where it helps to have a little emacs foo. spacemacs does not entirely remove that need, ime. In your .spacemacs there's a function dotspacemacs/user-config. That runs _after_ spacemacs loads and inits all its layers. It's a good place to configure all the various modes in ways that the layer may not have exposed. Regarding indent, I have this kind of thing: ;; tab for indent, me like (define-key prog-mode-map (kbd "<tab>") 'indent-for-tab-command) (setq web-mode-markup-indent-offset 2) (setq web-mode-css-indent-offset 2) (setq web-mode-code-indent-offset 2) (setq css-indent-offset 2) (setq-default js-indent-level 2) but for any given mode, you can find the variables to set, usually involving the word 'offset' and go from there. You can also use the customize feature -- space colon customize. I've really found emacs and spacemacs worth the effort, but there definitely is effort.