emacs vue.js
语音模式 (vue-mode)
Emacs major mode for vue.js.
vue.js的Emacs主要模式。
安装 (Install)
Emacs users may install the package from MELPA. vue-mode
should then be activated on all files with a .vue
extension.
Emacs用户可以从MELPA安装该软件包。 然后,应在所有扩展名为.vue
文件上激活vue-mode
。
太空巨星 (Spacemacs)
There are two ways to install and configure vue-mode when using spacemacs.
使用spacemacs时,有两种安装和配置vue模式的方法。
没有层的简单方法 (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.
Spacemacs允许使用dotspacemacs-additional-packages
变量在其层系统之外安装其他软件包。 将vue-mode
添加到此列表。
Edit your ~/.spacemacs
file as follows (to find it press SPC
f
e
d
):
如下所示编辑~/.spacemacs
文件(要找到它,请按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.
创建层是安装软件包的更复杂的方法,但是它可以提供更大的灵活性,并可以通过自动加载更快地启动。 您可以在这里阅读有关它的更多信息: Spacemacs Layers 。
The following is a minimal package.el
file for a custom vue-mode
layer:
以下是用于自定义vue-mode
层的最小package.el
文件:
(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)))
翻译自: https://vuejsexamples.com/emacs-major-mode-for-vue-js-based-on-mmm-mode/
emacs vue.js