From e952addbf7ebe61154cf73f069230943a3f4ea4c Mon Sep 17 00:00:00 2001 From: leafOfTree Date: Fri, 17 Jul 2020 08:00:37 +0800 Subject: [PATCH] Adjust comments length --- syntax/vue-html.vim | 8 ++++---- syntax/vue-javascript.vim | 9 +++++---- syntax/vue.vim | 32 ++++++++++++++++---------------- 3 files changed, 25 insertions(+), 24 deletions(-) diff --git a/syntax/vue-html.vim b/syntax/vue-html.vim index 64dc050..e0699f3 100644 --- a/syntax/vue-html.vim +++ b/syntax/vue-html.vim @@ -1,17 +1,17 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Config {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let s:highlight_vue_attr = exists("g:vim_vue_plugin_highlight_vue_attr") \ && g:vim_vue_plugin_highlight_vue_attr == 1 "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Syntax highlight {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" syntax match VueComponentName containedin=htmlTagN '\v\C<[a-z0-9]+(-[a-z0-9]+)+>' syntax match VueComponentName containedin=htmlTagN '\v\C<([A-Z][a-zA-Z0-9]+)+>' syntax keyword VueComponentName containedin=htmlTagN component transition slot diff --git a/syntax/vue-javascript.vim b/syntax/vue-javascript.vim index 2530b2a..3fa7633 100644 --- a/syntax/vue-javascript.vim +++ b/syntax/vue-javascript.vim @@ -1,19 +1,19 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Config {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let s:highlight_vue_keyword = exists("g:vim_vue_plugin_highlight_vue_keyword") \ && g:vim_vue_plugin_highlight_vue_keyword == 1 if !s:highlight_vue_keyword | finish | endif "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Syntax highlight {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let s:vue_keywords = 'name parent functional delimiters comments components directives filters extends mixins inheritAttrs model props propsData data computed watch methods template render renderError inject provide beforeCreate created beforeMount mounted beforeUpdate updated activated deactivated beforeDestroy destroyed' let s:vue_keywords_regexp = join(split(s:vue_keywords, ' '), '|') @@ -33,3 +33,4 @@ highlight default link vueObjectKey Constant highlight default link vueObjectFuncName Constant highlight default link vueObjectFuncKey Constant "}}} +" vim: fdm=marker diff --git a/syntax/vue.vim b/syntax/vue.vim index 58adb40..169100a 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -1,4 +1,4 @@ -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Vim syntax file " " Language: Vue @@ -6,18 +6,18 @@ " " CREDITS: Inspired by mxw/vim-jsx. " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" if exists("b:current_syntax") && b:current_syntax == 'vue' finish endif " For advanced users, this variable can be used to avoid overload let b:current_loading_main_syntax = 'vue' -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Config {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" let s:load_full_syntax = exists("g:vim_vue_plugin_load_full_syntax") \ && g:vim_vue_plugin_load_full_syntax == 1 let s:use_pug = exists("g:vim_vue_plugin_use_pug") @@ -36,11 +36,11 @@ let s:use_typescript = exists("g:vim_vue_plugin_use_typescript") \ && g:vim_vue_plugin_use_typescript == 1 "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Functions {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" function! s:LoadSyntax(group, type) if s:load_full_syntax call s:LoadFullSyntax(a:group, a:type) @@ -80,11 +80,11 @@ function! s:SetCurrentSyntax(type) endfunction "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Load main syntax {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Load syntax/html.vim to syntax group, which loads full JavaScript and CSS " syntax. It defines group htmlJavaScript and htmlCss. call s:LoadSyntax('@HTMLSyntax', 'html') @@ -107,11 +107,11 @@ endif runtime syntax/vue-javascript.vim "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Load pre-processors syntax {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " If pug is enabled, load vim-pug syntax if s:use_pug call s:LoadFullSyntax('@PugSyntax', 'pug') @@ -154,11 +154,11 @@ if s:use_typescript endif "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Syntax highlight {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " All start with html/javascript/css for emmet-vim in-file type detection syntax region htmlVueTemplate fold \ start=+]*>+ @@ -236,11 +236,11 @@ highlight default link cssKeyFrameProp2 Constant "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Syntax patch {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Patch 7.4.1142 if has("patch-7.4-1142") if has("win32") @@ -318,11 +318,11 @@ silent! syntax clear htmlHead syntax match htmlArg '\v' containedin=@HTMLSyntax "}}} -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " " Syntax sync {{{ " -""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" syntax sync clear syntax sync minlines=10 syntax sync match vueHighlight groupthere NONE "