vue-format icon indicating copy to clipboard operation
vue-format copied to clipboard

Vue.js的.vue文件的格式化Atom插件

#vue-format package (https://github.com/LeslieYQ/vue-format)

A screenshot of your package

apm install vue-format

Or Settings/Preferences ➔ Packages ➔ Search for vue-format

Language Support

  • [x] Vue, including html, css(not stylus, less, scss) , js (es6)

Usage

It will beautify .vue file for html,css and js

Shortcut

You can also type ctrl-alt-v as a shortcut or click Packages > vue-format in the menu.

Custom Keyboard Shortcuts

See Keymaps In-Depth for more details.

For example:

'.editor':
  'ctrl-alt-b': 'atom-beautify:beautify-editor'

Configuration

use js-beautify default

Simple

See examples/simple-jsbeautifyrc/.jsbeautifyrc.

{
  "indent_size": 2,
  "indent_char": " ",
  "other": " ",
  "indent_level": 0,
  "indent_with_tabs": false,
  "preserve_newlines": true,
  "max_preserve_newlines": 2,
  "jslint_happy": true,
  "indent_handlebars": true
}

License

MIT © LeslieYQ yuqiu