New answers tagged

1

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. ...


1

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: ...


0

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)


0

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]?\\'")))


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 ...


0

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." (interactive) (if (or indent-tabs-mode (region-active-p) (> (point) (save-excursion (back-to-indentation)...


1

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: (use-package vue-mode :mode "\\.vue$" :config (add-to-list 'mmm-save-local-variables '(syntax-ppss-...


0

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 json.el.gz. -- 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: { "menu": { "id": "file", "...


0

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 () (interactive) (forward-line 0) (if (looking-at "^¶") (while (looking-at "^¶\\|[ \t]") (delete-char 1)) (insert (propertize "¶" 'font-...


Top 50 recent answers are included