Vim 神器的打造方式(2)

Vim 神器的打造方式

Plug 'hail2u/vim-css3-syntax' Plug 'ap/vim-css-color' augroup VimCSS3Syntax autocmd! autocmd FileType css setlocal iskeyword+=- augroup END JavaScipt

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

(注:上述脚本中存在特殊字符,有的情况下显示不正确,请直接用上述链接的内容。)

React

Plug'mxw/vim-jsx'

let g:jsx_ext_required =0

Prettier

Plug'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

总结

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/13296.html