As mentioned by @JonatanLindén, fill-prefix is set to a string containing 18 spaces. This is because bibtex-clean-entry is using fill-prefix to align continuing text after equal sign. Setting fill-prefix to "" can solve the indentation issue. But to have better alignment when formating entry, you can advice bibtex-clean-entry to temporarily set fill-prefix.
Indentation in js2-mode is not as customizable as indentation in C mode. As such it's not possible to do this outside of changing the source code for js2-mode itself.
Like you, I like to have statements inside a function indented relative to the function keyword, so I added this code to the middle of the js2-bounce-indent function:
;; Fifth likely point: ...
Just see to it that the whole buffer is free of tabulators
before you export it. To avoid untabbing the original,
use a hook.
(defun org*-export-untabify (backend)
(untabify 0 (point-max)))
(add-hook 'org-export-before-parsing-hook 'org*-export-untabify)
Solved: After some digging it turns out the solution is actually really simple you just need to tell web mode to act the same for.js and .jsx files by adding this line into your emacs config:
(setq web-mode-content-types-alist '(("jsx" . "\\.js[x]?\\'")))
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.
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 ...
This can be done using this function, based on this answer on the Emacs wiki.
(defun my-backspace-whitespace-to-tab-stop ()
"Delete whitespace backwards to the next tab-stop, otherwise delete one character."
(if (or indent-tabs-mode (region-active-p)
The problem has been reported as #99 and already fixed in master of mmm-mode, but since there is no new release, you have to install the newest mmm-mode manually, or add the missing setting to mmm-save-local-variables -- for example with use-package:
(add-to-list 'mmm-save-local-variables '(syntax-ppss-...
With emacs 26.3 you can just use the stock json-pretty-print function.
json-pretty-print is an interactive and compiled function defined in
-- Emacs 26.3 documentation
select the region and M-x json-pretty-print.
I've just executed this procedure taking your example as input. Here is the result:
What you're trying to do is not possible with org-indent-mode turned on. Maybe you can trick the mode by inserting some invisible character before inserting the space/tab:
(defun org-indent-paragraph ()
(if (looking-at "^¶")
(while (looking-at "^¶\\|[ \t]")
(insert (propertize "¶" 'font-...