2

With web-mode, make sure your treating your code as React, not JavaScript. Using your init file, and saving your example code to a file with a .js extension, I get the behavior you describe. Saving your example code to a .jsx file, the html is syntax highlighted and indented properly. To specify ReactJS vs JavaScript you could mess with web-mode-content-...


1

If sh-use-smie is set to t the Simple Minded Indentation Engine (SMIE) is used for indentation. As you experience, the sh-mode setup for SMIE does not cover all the alternate complex commands of zsh yet. Note that those forms should not be used in new programs. I cite the zsh doc: These are non-standard and are likely not to be obvious even to seasoned ...


1

When taking other people's code, it's important to understand what it does. For that you can use C-h o (aka describe symbol). E.g. C-h o indent-tabs-mode RET will tell you: Indentation can insert tabs if this is non-nil. and C-h o tab-width RET: Distance between tab stops (for display of tab characters), in columns. NOTE: This controls the display ...


1

I assume you always want an indentation with 4 spaces even if there are indents of width 8 lurking around in your python file. Set python-indent-guess-indent-offset to nil and keep the default value 4 for python-indent-offset.


1

In Emacs 25, they changed the default behavior of RET. Previously (prior to Emacs 25) RET just inserted a newline char (taking you to the beginning of the next line), and C-j did what RET does now: inserts a newline char and then indents according to the previous line's code. You can restore the previous default behavior this way (it's what I do): (when (...


Only top voted, non community-wiki answers of a minimum length are eligible