Install emacs coding support plugin, formatter for emacs lisp, shfmt, web-beautify and more.
Language Support
markdown
directly install form MELPA use “M-x package-install markdown-mode”
or git clone
repository from github, and put markdown-mode.el
to location like ~/.emacs.d/third-party/markdown-mode/markdown-mode.el
. and add below code to init.el
|
|
and then M-x eval-buffer
to load the plugin.
python
javascript
Formatter
emacs lisp formatter
I can’t install from MELPA, so insatll it manually. Download “elfmt.el” from github, place it under “~/.emacs.d/third-party/elfmt” directory.
add code below to load it:
|
|
then eval it, and just use M-x elfmt
.
- Type M-x elfmt to format the current buffer
- Type M-x elfmt-sexp to format the current sexp
- Type M-x elfmt-mode to automatically format the buffer on save
- Type M-x elfmt-global-mode to enable elfmt-mode everywhere
shell-like language formatter
Download binary file, add to user PATH variable,I put under “C:/usr/Runtime/bin”
could directly install from MELPA, use “M-x package-install shfmt”.
html,css,javascript formatter
directly install form MELPA use “M-x package-install markdown-mode”
Typing to use it:
- M-x web-beautify-css
- M-x web-beautify-html
- M-x web-beautify-js
optional, can add code below binding shortcut key:
|
|