aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'vim/syntax')
-rw-r--r--vim/syntax/i3.vim93
-rw-r--r--vim/syntax/notmuch-compose.vim7
-rw-r--r--vim/syntax/notmuch-folders.vim12
-rw-r--r--vim/syntax/notmuch-git-diff.vim26
-rw-r--r--vim/syntax/notmuch-search.vim12
-rw-r--r--vim/syntax/notmuch-show.vim24
-rw-r--r--vim/syntax/prolog.vim119
7 files changed, 293 insertions, 0 deletions
diff --git a/vim/syntax/i3.vim b/vim/syntax/i3.vim
new file mode 100644
index 0000000..e5c4544
--- /dev/null
+++ b/vim/syntax/i3.vim
@@ -0,0 +1,93 @@
+" Vim syntax file
+" Language: i3-wm config file
+" Maintainer: David Pugnasse
+" Latest Revision: 24 August 2011
+
+if exists("b:current_syntax")
+ finish
+endif
+
+" Symbols
+syn match i3Operators "+\|→"
+syn match i3ChainDelimiter ";"
+
+syn match i3Var "\$\w\+"
+
+" Strings
+syn region i3SimpleString keepend start='[^ \t]' end='$\|;' contained contains=i3ChainDelimiter,i3Var
+syn match i3QuotedString '"[^"]\+"' contained
+syn cluster i3String contains=i3SimpleString,i3QuotedString
+
+" Config keywords
+syn keyword i3ConfigCommand bind bindcode bindsym assign new_window popup_during_fullscreen font floating_modifier default_orientation workspace_layout for_window focus_folows_mouse
+syn match i3IpcSocket "ipc-socket" nextgroup=@i3String skipwhite
+
+" Key modifiers
+syn keyword i3KeyModifier Shift Control Mod1 Mod2 Mod3 Mod4 Mod5
+
+" Command keywords
+syn keyword i3Command exit reload restart kill window fullscreen global layout border focus move open split append_layout mark resize grow shrink restore
+syn keyword i3Param 1pixel default stacked tabbed normal none tiling stacking floating enable disable up down horizontal vertical up down left right parent child px or ppt leave_fullscreen toggle mode_toggle
+syn keyword i3WsSpecialParam next prev
+
+" Commands
+syn region i3ExecCommand keepend start='[^ \t]' end='$\|;' contained contains=i3ChainDelimiter,i3Var
+syn match i3QuotedExecCommand '"[^"]\+"' contained
+syn keyword i3ExecKeyword exec exec_always nextgroup=i3QuotedExecCommand,i3ExecCommand skipwhite
+
+" Font statement
+syn keyword i3FontStatement font nextgroup=@i3String skipwhite
+
+" Set statement
+syn match i3SetVar "\$\w\+" contained nextgroup=@i3String skipwhite
+syn keyword i3SetKeyword set nextgroup=i3SetVar skipwhite
+
+" Workspaces
+syn keyword i3WsKeyword workspace nextgroup=i3WsSpecialParam,@i3String skipwhite
+
+" Mode
+syn keyword i3ModeKeyword mode nextgroup=@i3String skipwhite
+
+" Comments
+syn keyword i3Todo contained TODO FIXME XXX NOTE
+syn match i3Comment "#.*$" contains=i3Todo
+
+" Hex color code
+syn match i3Color "#[0-9a-fA-F]\{6\}" contained nextgroup=i3Color skipwhite
+syn match i3ColorDef "client\.\(focused_inactive\|focused\|unfocused\|urgent\|background\)" nextgroup=i3Color skipwhite
+
+highlight link i3ChainDelimiter Operator
+highlight link i3Operators Operator
+
+highlight link i3ExecCommand Special
+highlight link i3QuotedExecCommand Special
+
+highlight link i3Param Constant
+highlight link i3Color Constant
+highlight link i3WsSpecialParam Constant
+
+highlight link i3Var Identifier
+highlight link i3SetVar Identifier
+
+highlight link i3KeyModifier Function
+
+highlight link i3SimpleString String
+highlight link i3QuotedString String
+highlight link i3WsName String
+highlight link i3QuotedWsName String
+highlight link i3SetValue String
+highlight link i3Font String
+
+highlight link i3ExecKeyword Keyword
+highlight link i3Command Keyword
+highlight link i3WsKeyword Keyword
+
+highlight link i3ColorDef Define
+highlight link i3ConfigCommand Define
+highlight link i3IpcSocket Define
+highlight link i3SetKeyword Define
+highlight link i3ModeKeyword Define
+highlight link i3FontStatement Define
+
+highlight link i3Todo Todo
+highlight link i3Comment Comment \ No newline at end of file
diff --git a/vim/syntax/notmuch-compose.vim b/vim/syntax/notmuch-compose.vim
new file mode 100644
index 0000000..19adb75
--- /dev/null
+++ b/vim/syntax/notmuch-compose.vim
@@ -0,0 +1,7 @@
+runtime! syntax/mail.vim
+
+syntax region nmComposeHelp contains=nmComposeHelpLine start='^Notmuch-Help:\%1l' end='^\(Notmuch-Help:\)\@!'
+syntax match nmComposeHelpLine /Notmuch-Help:/ contained
+
+highlight link nmComposeHelp Include
+highlight link nmComposeHelpLine Error
diff --git a/vim/syntax/notmuch-folders.vim b/vim/syntax/notmuch-folders.vim
new file mode 100644
index 0000000..9477f86
--- /dev/null
+++ b/vim/syntax/notmuch-folders.vim
@@ -0,0 +1,12 @@
+" notmuch folders mode syntax file
+
+syntax region nmFoldersCount start='^' end='\%10v'
+syntax region nmFoldersName start='\%11v' end='\%31v'
+syntax match nmFoldersSearch /([^()]\+)$/
+
+highlight link nmFoldersCount Statement
+highlight link nmFoldersName Type
+highlight link nmFoldersSearch String
+
+highlight CursorLine term=reverse cterm=reverse gui=reverse
+
diff --git a/vim/syntax/notmuch-git-diff.vim b/vim/syntax/notmuch-git-diff.vim
new file mode 100644
index 0000000..6f15fdc
--- /dev/null
+++ b/vim/syntax/notmuch-git-diff.vim
@@ -0,0 +1,26 @@
+syn match diffRemoved "^-.*"
+syn match diffAdded "^+.*"
+
+syn match diffSeparator "^---$"
+syn match diffSubname " @@..*"ms=s+3 contained
+syn match diffLine "^@.*" contains=diffSubname
+
+syn match diffFile "^diff .*"
+syn match diffNewFile "^+++ .*"
+syn match diffOldFile "^--- .*"
+
+hi def link diffOldFile diffFile
+hi def link diffNewFile diffFile
+
+hi def link diffFile Type
+hi def link diffRemoved Special
+hi def link diffAdded Identifier
+hi def link diffLine Statement
+hi def link diffSubname PreProc
+
+syntax match gitDiffStatLine /^ .\{-}\zs[+-]\+$/ contains=gitDiffStatAdd,gitDiffStatDelete
+syntax match gitDiffStatAdd /+/ contained
+syntax match gitDiffStatDelete /-/ contained
+
+hi def link gitDiffStatAdd diffAdded
+hi def link gitDiffStatDelete diffRemoved
diff --git a/vim/syntax/notmuch-search.vim b/vim/syntax/notmuch-search.vim
new file mode 100644
index 0000000..f458d77
--- /dev/null
+++ b/vim/syntax/notmuch-search.vim
@@ -0,0 +1,12 @@
+syntax region nmSearch start=/^/ end=/$/ oneline contains=nmSearchDate
+syntax match nmSearchDate /^.\{-13}/ contained nextgroup=nmSearchNum
+syntax match nmSearchNum /.\{-4}/ contained nextgroup=nmSearchFrom
+syntax match nmSearchFrom /.\{-21}/ contained nextgroup=nmSearchSubject
+syntax match nmSearchSubject /.\{0,}\(([^()]\+)$\)\@=/ contained nextgroup=nmSearchTags
+syntax match nmSearchTags /.\+$/ contained
+
+highlight link nmSearchDate Statement
+highlight link nmSearchNum Type
+highlight link nmSearchFrom Include
+highlight link nmSearchSubject Normal
+highlight link nmSearchTags String
diff --git a/vim/syntax/notmuch-show.vim b/vim/syntax/notmuch-show.vim
new file mode 100644
index 0000000..c3a98b7
--- /dev/null
+++ b/vim/syntax/notmuch-show.vim
@@ -0,0 +1,24 @@
+" notmuch show mode syntax file
+
+syntax cluster nmShowMsgDesc contains=nmShowMsgDescWho,nmShowMsgDescDate,nmShowMsgDescTags
+syntax match nmShowMsgDescWho /[^)]\+)/ contained
+syntax match nmShowMsgDescDate / ([^)]\+[0-9]) / contained
+syntax match nmShowMsgDescTags /([^)]\+)$/ contained
+
+syntax cluster nmShowMsgHead contains=nmShowMsgHeadKey,nmShowMsgHeadVal
+syntax match nmShowMsgHeadKey /^[^:]\+: / contained
+syntax match nmShowMsgHeadVal /^\([^:]\+: \)\@<=.*/ contained
+
+syntax cluster nmShowMsgBody contains=@nmShowMsgBodyMail,@nmShowMsgBodyGit
+syntax include @nmShowMsgBodyMail syntax/mail.vim
+
+silent! syntax include @nmShowMsgBodyGit syntax/notmuch-git-diff.vim
+
+highlight nmShowMsgDescWho term=reverse cterm=reverse gui=reverse
+highlight link nmShowMsgDescDate Type
+highlight link nmShowMsgDescTags String
+
+highlight link nmShowMsgHeadKey Macro
+"highlight link nmShowMsgHeadVal NONE
+
+highlight Folded term=reverse ctermfg=LightGrey ctermbg=Black guifg=LightGray guibg=Black
diff --git a/vim/syntax/prolog.vim b/vim/syntax/prolog.vim
new file mode 100644
index 0000000..58de71f
--- /dev/null
+++ b/vim/syntax/prolog.vim
@@ -0,0 +1,119 @@
+" Vim syntax file
+" Language: PROLOG
+" Maintainers: Thomas Koehler <jean-luc@picard.franken.de>
+" Last Change: 2009 Dec 04
+" URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/vim/syntax/prolog.vim
+
+" There are two sets of highlighting in here:
+" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
+" Otherwise you get more highlighting.
+
+" Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Prolog is case sensitive.
+syn case match
+
+" Very simple highlighting for comments, clause heads and
+" character codes. It respects prolog strings and atoms.
+
+syn region prologCComment start=+/\*+ end=+\*/+
+syn match prologComment +%.*+
+
+syn keyword prologKeyword module meta_predicate multifile dynamic
+syn match prologCharCode +0'\\\=.+
+syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
+syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
+syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ contains=prologComment,prologCComment,prologString
+
+if !exists("prolog_highlighting_clean")
+
+ " some keywords
+ " some common predicates are also highlighted as keywords
+ " is there a better solution?
+ syn keyword prologKeyword abolish current_output peek_code
+ syn keyword prologKeyword append current_predicate put_byte
+ syn keyword prologKeyword arg current_prolog_flag put_char
+ syn keyword prologKeyword asserta fail put_code
+ syn keyword prologKeyword assertz findall read
+ syn keyword prologKeyword at_end_of_stream float read_term
+ syn keyword prologKeyword atom flush_output repeat
+ syn keyword prologKeyword atom_chars functor retract
+ syn keyword prologKeyword atom_codes get_byte set_input
+ syn keyword prologKeyword atom_concat get_char set_output
+ syn keyword prologKeyword atom_length get_code set_prolog_flag
+ syn keyword prologKeyword atomic halt set_stream_position
+ syn keyword prologKeyword bagof integer setof
+ syn keyword prologKeyword call is stream_property
+ syn keyword prologKeyword catch nl sub_atom
+ syn keyword prologKeyword char_code nonvar throw
+ syn keyword prologKeyword char_conversion number true
+ syn keyword prologKeyword clause number_chars unify_with_occurs_check
+ syn keyword prologKeyword close number_codes var
+ syn keyword prologKeyword compound once write
+ syn keyword prologKeyword copy_term op write_canonical
+ syn keyword prologKeyword current_char_conversion open write_term
+ syn keyword prologKeyword current_input peek_byte writeq
+ syn keyword prologKeyword current_op peek_char
+
+ syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|="
+ syn match prologAsIs "===\|\\===\|<=\|=>"
+
+ syn match prologNumber "\<[0123456789]*\>'\@!"
+ syn match prologCommentError "\*/"
+ syn match prologSpecialCharacter ";"
+ syn match prologSpecialCharacter "!"
+ syn match prologQuestion "?-.*\." contains=prologNumber
+
+
+endif
+
+syn sync maxlines=50
+
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_prolog_syn_inits")
+ if version < 508
+ let did_prolog_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ " The default highlighting.
+ HiLink prologComment Comment
+ HiLink prologCComment Comment
+ HiLink prologCharCode Special
+
+ if exists ("prolog_highlighting_clean")
+
+ HiLink prologKeyword Statement
+ HiLink prologClauseHead Statement
+
+ else
+
+ HiLink prologKeyword Keyword
+ HiLink prologClauseHead Constant
+ HiLink prologQuestion PreProc
+ HiLink prologSpecialCharacter Special
+ HiLink prologNumber Number
+ HiLink prologAsIs Normal
+ HiLink prologCommentError Error
+ HiLink prologAtom String
+ HiLink prologString String
+ HiLink prologOperator Operator
+
+ endif
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "prolog"
+
+" vim: ts=8