Skip to content
Snippets Groups Projects
Commit 5a048f22 authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.

parent 105be548
No related branches found
No related tags found
No related merge requests found
" syntax/flow.vim
if exists("b:current_syntax")
finish
endif
syntax clear
" Level 1 tags (0-space indent, ends with :)
syntax match FlowLevel1 /^\S.*: *$/
" Level 2 tags (2-space indent, ends with :)
syntax match FlowLevel2 /^ \S.*: *$/
" Level 3 args (4-space indent)
syntax match FlowLevel3 /^ .*$/
" Multi-line block: starts on a non-space line not ending with ':'
" ends just before the next level-1 or level-2 tag
syntax region FlowMultiline start=/^\S.*[^:]$/ end=/^\(\S.*: *$\| \S.*: *$\)/me=s-1 keepend contains=NONE
" Highlight links
highlight def link FlowLevel1 Statement
highlight def link FlowLevel2 String
highlight def link FlowLevel3 Identifier
highlight FlowMultiline guifg=#888888 ctermfg=8
let b:current_syntax = "flow"
" syntax/flow.vim
if exists("b:current_syntax")
finish
endif
syntax clear
" Level 1 tags (0 space, ends with :)
syntax match FlowLevel1 /^\S.*: *$/
" Level 2 tags (2 spaces, ends with :)
syntax match FlowLevel2 /^ \S.*: *$/
" Level 3 args (4-space indent, no colon)
syntax match FlowLevel3 /^ .*/ contains=FlowArg1,FlowArg2,FlowArg3
" Round-robin word highlight in level 3
syntax match FlowArg1 /\%(^ \)\@<=\S\+/ contained
syntax match FlowArg2 /\%(^ \S\+\s\+\)\@<=\S\+/ contained
syntax match FlowArg3 /\%(^ \S\+\s\+\S\+\s\+\)\@<=\S\+/ contained
" Multi-line block: starts on non-space line not ending with ':', ends before next label
syntax region FlowMultiline start=/^\S.*[^:]$/ end=/^\(\S.*: *$\| \S.*: *$\)/me=s-1 contains=NONE keepend
" Highlights
highlight def link FlowLevel1 Statement
highlight def link FlowLevel2 String
highlight def link FlowArg1 Identifier
highlight def link FlowArg2 Type
highlight def link FlowArg3 Constant
highlight FlowMultiline guifg=#888888 ctermfg=8
let b:current_syntax = "flow"
...@@ -39,6 +39,8 @@ set hlsearch ...@@ -39,6 +39,8 @@ set hlsearch
map <C-f> viwyk/<C-r>"<CR> map <C-f> viwyk/<C-r>"<CR>
set mouse= set mouse=
" my private flow file format
au BufRead,BufNewFile *.flow set filetype=flow
" """""""""""""""""""""" BEGIN edit GPG file """""""""""""""""""""""""""""" " """""""""""""""""""""" BEGIN edit GPG file """"""""""""""""""""""""""""""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment