

GitHub - AdamNiederer/vue-mode: Emacs major mode for vue.js
source link: https://github.com/AdamNiederer/vue-mode
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

vue-mode
Emacs major mode for vue.js based on mmm-mode
.
Preview
Install
Emacs users may install the package from MELPA. vue-mode
should then be
activated on all files with a .vue
extension.
Spacemacs
There are two ways to install and configure vue-mode when using spacemacs.
The Simple Way, Without a Layer
Spacemacs allows the installation of additional packages outside of its layer
system using the dotspacemacs-additional-packages
variable. Add vue-mode
to
this list.
Edit your ~/.spacemacs
file as follows (to find it press SPC
f
e
d
):
dotspacemacs-additional-packages '(vue-mode)
With a Layer
Creating a layer is a more complicated method of installing the package, but it allows for greater flexibility, and faster started via autoloading. You can read more about it here: Spacemacs Layers.
The following is a minimal package.el
file for a custom vue-mode
layer:
(setq vue-mode-packages '(vue-mode)) (setq vue-mode-excluded-packages '()) (defun vue-mode/init-vue-mode () "Initialize my package" (use-package vue-mode))
If you want to customize the region background color (default is highlight):
(defun vue-mode/init-vue-mode () (use-package vue-mode :config ;; 0, 1, or 2, representing (respectively) none, low, and high coloring (setq mmm-submode-decoration-level 0)))
Why js-mode
instead of js2-mode
?
js2-mode
does not yet work with "multi-mode" modes such as mmm-mode. See
https://github.com/mooz/js2-mode/issues/124.
How can I reload the submodes in a buffer?
Try M-x vue-mode-reparse
.
How do I disable that ugly background color?
Customize mmm-default-submode-face
. It's an mmm-mode
default.
Add the following lines to your .emacs.d/init.el
to set a lighter color:
(add-hook 'mmm-mode-hook (lambda () (set-face-background 'mmm-default-submode-face "#fafafa")))
Or disable the background color completely in your .emacs.d/init.el
:
(add-hook 'mmm-mode-hook (lambda () (set-face-background 'mmm-default-submode-face nil)))
Recommend
-
108
I've taken up maintaining hy-mode - a major mode for lispy python. I narrate working through specific problems in...
-
153
Emacs support for Stan 2021-01-30 Version 10.2.1 bugfix for #64 2020-08-30 Version 10.2.0 update for Stan version 2.24 Packages an...
-
160
Haskell Mode for Emacs This is an Emacs mode for editing, developing and debugging Haskell programs. Home page. I just want to thank everybody invol...
-
102
elm-mode Elm mode for Emacs. Features Syntax highlighting. Intelligent indentation. Integration with elm-make Integration with elm-repl Integration with
-
203
faster SIMD for Humans Easy, powerful, portable, absurdly fast numerical calculations. Includes static dispatch with inlining based on your platform and vector types, zero-allocation iteration, vectorized loading/storing...
-
66
README.md
-
81
README.md
-
18
Files Permalink Latest commit message Commit time
-
13
Emacs major-mode to work with Beancount ledger files This package provides beancount-mode an Emacs major-mode implementing syntax...
-
15
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK