My only tab-related init.el
config is:
(setq-default indent-tabs-mode nil) ;; indentation can't insert tabs
(setq-default tab-width 4) ;; make tab-width 4 (spaces)
but in c-ts-mode
I have that the indentation only does and works with 2 spaces (I need to indent-region
whole file otherwise to fix it). How can I make this back to 4?
You must log in or register to comment.
Use editorconfig!
(setq c-default-style "stroustrup")
I think you’re looking for ‘c-basic-offset’, although I’d echo the sentiment that you should use a formatter instead. For that you can check out the reformatter package, which lets you setup hooks based on the programming mode to invoke the formatter of your choice, e.g. setup a hook for c/c++ to use clang format or whatever you’d
c-basic-offset did not work. that was the first thing i tried.