Plug'pangloss/vim-javascript'
let g:javascript_plugin_jsdoc =1
let g:javascript_plugin_ngdoc =1
let g:javascript_plugin_flow =1
set foldmethod=syntax
let g:javascript_conceal_function ="ƒ"
let g:javascript_conceal_null ="ø"
let g:javascript_conceal_this ="@"
let g:javascript_conceal_return ="⇚"
let g:javascript_conceal_undefined ="¿"
let g:javascript_conceal_NaN ="ℕ"
let g:javascript_conceal_prototype ="¶"
let g:javascript_conceal_static ="•"
let g:javascript_conceal_super ="Ω"
let g:javascript_conceal_arrow_function ="⇒"
let g:javascript_conceal_noarg_arrow_function =" "
let g:javascript_conceal_underscore_arrow_function =" "
set conceallevel=1
(注:上述脚本中存在特殊字符,有的情况下显示不正确,请直接用上述链接的内容。)
ReactPlug'mxw/vim-jsx'
let g:jsx_ext_required =0
PrettierPlug'prettier/vim-prettier',{
\ 'do':'yarn install',
\ 'for':['javascript','typescript','css','less','scss','json','graphql']}
let g:prettier#config#bracket_spacing ='true'
let g:prettier#config#jsx_bracket_same_line ='false'
let g:prettier#autoformat =0
autocmd BufWritePre*.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql PrettierAsync
#:Prettier
总结