From da709cd9e90c3ab644bb92700f0ed40d965b80d3 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Thu, 13 Oct 2011 11:17:19 +0600 Subject: Initial commit. --- files/.vim/syntax/asciidoc.vim | 166 +++++++++++++++++++++++++++++++++++++++++ files/.vim/syntax/python.vim | 13 ++++ files/.vim/syntax/rfc.vim | 30 ++++++++ files/.vim/syntax/scala.vim | 87 +++++++++++++++++++++ files/.vim/syntax/snippet.vim | 17 +++++ files/.vim/syntax/worklist.vim | 19 +++++ 6 files changed, 332 insertions(+) create mode 100755 files/.vim/syntax/asciidoc.vim create mode 100755 files/.vim/syntax/python.vim create mode 100755 files/.vim/syntax/rfc.vim create mode 100755 files/.vim/syntax/scala.vim create mode 100755 files/.vim/syntax/snippet.vim create mode 100755 files/.vim/syntax/worklist.vim (limited to 'files/.vim/syntax') diff --git a/files/.vim/syntax/asciidoc.vim b/files/.vim/syntax/asciidoc.vim new file mode 100755 index 0000000..a102e5a --- /dev/null +++ b/files/.vim/syntax/asciidoc.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: AsciiDoc +" Author: Stuart Rackham (inspired by Felix +" Obenhuber's original asciidoc.vim script). +" URL: http://www.methods.co.nz/asciidoc/ +" Licence: GPL (http://www.gnu.org) +" Remarks: Vim 6 or greater +" Limitations: See 'Appendix E: Vim Syntax Highlighter' in the AsciiDoc 'User +" Guide'. + +if exists("b:current_syntax") + finish +endif + +syn clear +syn sync fromstart +syn sync linebreaks=1 + +" Run :help syn-priority to review syntax matching priority. +syn keyword asciidocToDo TODO FIXME XXX ZZZ +syn match asciidocBackslash /\\/ +syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/ +syn match asciidocCallout /\\\@/ +syn match asciidocListBlockDelimiter /^--$/ +syn match asciidocLineBreak /[ \t]+$/ +syn match asciidocRuler /^'\{3,}$/ +syn match asciidocPagebreak /^<\{3,}$/ +syn match asciidocEntityRef /\\\@\?[0-9A-Za-z_]\@!/ +syn match asciidocAttributeRef /\\\@.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL +syn match asciidocTablePrefix /\(\S\@.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL + +syn match asciidocListContinuation /^+$/ +syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout keepend +syn region asciidocOpenBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout keepend +syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo +syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$" +" Allowing leading \w characters in the filter delimiter is to accomodate +" the pre version 8.2.7 syntax and may be removed in future releases. +syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/ + +syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@>\)\|^$/ contains=asciidocQuoted.* keepend +syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@ +" Last Change: 2010年1月16日 + +syntax clear +syntax case match + +syn match rfcTitle /^\v( \n)@ +" URL: http://diwww.epfl.ch/~haberer/syntax/scala.html +" Last Change: 2004 April 18 +" Disclaimer: It's an absolut basic, very simple and by far not finished +" syntax file! It only recognizes basic keywords and constructs like comments +" any help is welcome + +" Remove any old syntax stuff +syn clear + +" syntax highlighting for words that are not identifiers: +" int unit double String Array byte short char long float +syn keyword scalaExternal import package +syn keyword scalaConditional if then else +syn keyword scalaRepeat while for do +syn keyword scalaType boolean int double byte short char long float +syn keyword scalaType unit +syn keyword scalaType val with type var yield + +syn keyword scalaStatement return +syn keyword scalaBoolean true false +syn keyword scalaConstant null +syn keyword scalaTypedef this super +syn keyword scalaLangClass String Array +syn keyword scalaScopeDecl private protected override +syn keyword scalaStorageClass abstract final sealed +syn keyword scalaExceptions throw try catch finally +syn keyword scalaClassDecl extends +" TODO differentiate the keyword class from MyClass.class -> use a match here +syn keyword scalaTypedef class +syn keyword scalaTypedef case +syn keyword scalaTypedef trait + +syn match scalaTypedef "\s*\" + +syn keyword scalaOperator new + +" same number definition as in java.vim +syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match scalaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match scalaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match scalaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +syn region scalaString start=+"+ end=+"+ + +" Functions +" def [name] [(prototype)] { +" +syn match scalaFunction "\s*\" + +" Comments +syn region scalaComment start="/\*" end="\*/" +syn match scalaLineComment "//.*" + + +if !exists("did_scala_syntax_inits") + let did_scala_syntax_inits = 1 + + " The default methods for highlighting. Can be overridden later + hi link scalaExternal Include + hi link scalaStatement Statement + hi link scalaConditional Conditional + hi link scalaRepeat Repeat + hi link scalaType Type + hi link scalaTypedef Typedef + hi link scalaBoolean Boolean + hi link scalaFunction Function + hi link scalaLangClass Constant + hi link scalaConstant Constant + hi link scalaScopeDecl scalaStorageClass + hi link scalaClassDecl scalaStorageClass + hi link scalaStorageClass StorageClass + hi link scalaExceptions Exception + hi link scalaOperator Operator + hi link scalaNumber Number + hi link scalaString String + hi link scalaComment Comment + hi link scalaLineComment Comment +endif + +let b:current_syntax = "scala" + +" if you want to override default methods for highlighting +"hi Conditional term=bold ctermfg=Cyan guifg=#80a0ff diff --git a/files/.vim/syntax/snippet.vim b/files/.vim/syntax/snippet.vim new file mode 100755 index 0000000..ea6042a --- /dev/null +++ b/files/.vim/syntax/snippet.vim @@ -0,0 +1,17 @@ +" Syntax highlighting for snippet files (used for snipMate.vim) +" Hopefully this should make snippets a bit nicer to write! +syn match snipComment '^#.*' +syn match placeHolder '\${\d\+\(:.\{-}\)\=}' contains=snipCommand +syn match tabStop '\$\d\+' +syn match snipCommand '`.\{-}`' +syn match snippet '^snippet.*' transparent contains=multiSnipText,snipKeyword +syn match multiSnipText '\w\+ \zs.*' contained +syn match snipKeyword '^snippet'me=s+8 contained + +hi link snipComment Comment +hi link multiSnipText String +hi link snipKeyword Keyword +hi link snipComment Comment +hi link placeHolder Special +hi link tabStop Special +hi link snipCommand String diff --git a/files/.vim/syntax/worklist.vim b/files/.vim/syntax/worklist.vim new file mode 100755 index 0000000..f9b2017 --- /dev/null +++ b/files/.vim/syntax/worklist.vim @@ -0,0 +1,19 @@ +" Vim syntax file + +syntax clear +syntax case match + +syn match worklistTag /\v\[\w+\]/ +" Statuses +syn region worklistDone start=/\v^\-\s*\:DONE\:/ end=/\v^\s*$/ +syn region worklistBug start=/\v^\-\s*\:BUG\:/ end=/\v^\s*$/ +syn region worklistNew start=/\v^\-\s*\:NEW\:/ end=/\v^\s*$/ +syn region worklistLow start=/\v^\-\s*\:LOW\:/ end=/\v^\s*$/ + +hi link worklistDone Ignore +hi link worklistBug Error +hi link worklistNew Todo +hi link worklistLow Comment +hi link worklistTag Tag + +let b:current_syntax = "worklist" -- cgit v1.2.3