From 4b51bc00cda70d3c118401a74f1704df38c947a3 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 1 Feb 2011 09:48:30 -0500 Subject: v3 introduced as development branch, invoked using "sisu --v3 [instructions] --- .../v3/conf/editor-syntax-etc/vim/colors/slate.vim | 59 ++++++ .../v3/conf/editor-syntax-etc/vim/filetype.vim | 8 + .../conf/editor-syntax-etc/vim/ftplugin/sisu.vim | 182 ++++++++++++++++++ .../v3/conf/editor-syntax-etc/vim/syntax/sisu.vim | 210 +++++++++++++++++++++ .../conf/editor-syntax-etc/vim/templates/ssi.tpl | 40 ++++ .../conf/editor-syntax-etc/vim/templates/ssm.tpl | 40 ++++ .../conf/editor-syntax-etc/vim/templates/sst.tpl | 40 ++++ .../v3/conf/editor-syntax-etc/vim/vim-sisu.yaml | 7 + 8 files changed, 586 insertions(+) create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/filetype.vim create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/ftplugin/sisu.vim create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssi.tpl create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssm.tpl create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/templates/sst.tpl create mode 100644 data/sisu/v3/conf/editor-syntax-etc/vim/vim-sisu.yaml (limited to 'data/sisu/v3/conf/editor-syntax-etc/vim') diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim new file mode 100644 index 00000000..64ae0ff1 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/colors/slate.vim @@ -0,0 +1,59 @@ +"%% SiSU Vim color file +" Slate Maintainer: Ralph Amissah +" (originally looked at desert Hans Fugal http://hans.fugal.net/vim/colors/desert.vim (April/May 2003) +:set background=dark +:highlight clear +if version > 580 + hi clear + if exists("syntax_on") + syntax reset + endif +endif +:let colors_name = "slate" +:hi Normal guifg=White guibg=grey15 +:hi Cursor guibg=khaki guifg=slategrey +:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse +:hi Folded guibg=black guifg=grey40 ctermfg=grey ctermbg=darkgrey +:hi FoldColumn guibg=black guifg=grey20 ctermfg=4 ctermbg=7 +:hi IncSearch guifg=green guibg=black cterm=none ctermfg=yellow ctermbg=green +:hi ModeMsg guifg=goldenrod cterm=none ctermfg=brown +:hi MoreMsg guifg=SeaGreen ctermfg=darkgreen +:hi NonText guifg=RoyalBlue guibg=grey15 cterm=bold ctermfg=blue +:hi Question guifg=springgreen ctermfg=green +:hi Search guibg=peru guifg=wheat cterm=none ctermfg=grey ctermbg=blue +:hi SpecialKey guifg=yellowgreen ctermfg=darkgreen +:hi StatusLine guibg=#c2bfa5 guifg=black gui=none cterm=bold,reverse +:hi StatusLineNC guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse +:hi Title guifg=gold gui=bold cterm=bold ctermfg=yellow +:hi Statement guifg=CornflowerBlue ctermfg=lightblue +:hi Visual gui=none guifg=khaki guibg=olivedrab cterm=reverse +:hi WarningMsg guifg=salmon ctermfg=1 +:hi String guifg=SkyBlue ctermfg=darkcyan +:hi Comment term=bold ctermfg=11 guifg=grey40 +:hi Constant guifg=#ffa0a0 ctermfg=brown +:hi Special guifg=darkkhaki ctermfg=brown +:hi Identifier guifg=salmon ctermfg=red +:hi Include guifg=red ctermfg=red +:hi PreProc guifg=red guibg=white ctermfg=red +:hi Operator guifg=Red ctermfg=Red +:hi Define guifg=gold gui=bold ctermfg=yellow +:hi Type guifg=CornflowerBlue ctermfg=2 +:hi Function guifg=navajowhite ctermfg=brown +:hi Structure guifg=green ctermfg=green +:hi LineNr guifg=grey50 ctermfg=3 +:hi Ignore guifg=grey40 cterm=bold ctermfg=7 +:hi Todo guifg=orangered guibg=yellow2 +:hi Directory ctermfg=darkcyan +:hi ErrorMsg cterm=bold guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1 +:hi VisualNOS cterm=bold,underline +:hi WildMenu ctermfg=0 ctermbg=3 +:hi DiffAdd ctermbg=4 +:hi DiffChange ctermbg=5 +:hi DiffDelete cterm=bold ctermfg=4 ctermbg=6 +:hi DiffText cterm=bold ctermbg=1 +:hi Underlined cterm=underline ctermfg=5 +:hi Error guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1 +:hi SpellErrors guifg=White guibg=Red cterm=bold ctermfg=7 ctermbg=1 +:hi CursorLine guibg=black ctermbg=black +:hi CursorColumn guibg=black ctermbg=black + diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/filetype.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/filetype.vim new file mode 100644 index 00000000..917c3e04 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/filetype.vim @@ -0,0 +1,8 @@ +" SiSU filetype file +if exists("did_load_filetypes") + finish +endif +augroup filetypedetect + au! BufNewFile,BufRead *.sst,*.ssm,*.ssi,*.-sst setf sisu + au! BufNewFile,BufRead *._sst,*.sst.meta,*.-sst.meta,*._sst.meta setf sisu +augroup END diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/ftplugin/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/ftplugin/sisu.vim new file mode 100644 index 00000000..160444fd --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/ftplugin/sisu.vim @@ -0,0 +1,182 @@ +"%% SiSU Vim ftplugin +" SiSU Maintainer: Ralph Amissah +" SiSU Markup: SiSU (sisu-2.0) 2010-06-05 +" an ftplugin setting defaults for editing sisu markup files +:syntax on +:filetype on +:filetype indent on +:autocmd FileType sisu :set nonumber +:set encoding=utf-8 fileencodings= +:set ff=unix +:set autowrite " Automatically save before commands like :next and :make +:set nocompatible +:set tabstop=2 +:set expandtab +:set shiftwidth=2 +:set autoindent +:set showcmd " Show (partial) command in status line. +:set showmatch " Show matching brackets. +:set ignorecase " Do case insensitive matching +:set smartcase +:set incsearch +:set hlsearch +:set gdefault +:set guioptions=agr " add 'm' for menu +:map :if &guioptions =~# 'm' + \set guioptions-=m + \set guioptions-=T + \else + \set guioptions+=m + \set guioptions-=T + \endif +:set paste +:set statusline=%f%m%r%h%w\ [type=%Y]\ [format=%{&ff}]\ [%v:%l/%L\ %p%%] +:set laststatus=2 " status line always on +"% textwrap +:set whichwrap=<,>,h,l,[,] +:set nolinebreak " only affects display not buffer +:set wrap +:set wrapmargin=0 +"% map +":let mapleader = "," " consider +:map paste :set invpaste +"% wrap/formatting paragraph according to the current 'textwidth' with ^J (control-j): +:imap gqap +:nmap gqap +:vmap gq +"% save file, go to next file in buffer +:map nf :w :n +"% vimdiff q exits +:if &diff +: cmap q qa +:endif +"% directory files, placed in vertical split window +:map ls :vs :Explore +:map dir :vs :Explore +:if &diff +: cmap q qa +:endif +"% remapping lines make cursor jump a line at a time within wrapped text +:nnoremap j gj +:nnoremap k gk +:vnoremap j gj +:vnoremap k gk +:nnoremap gj +:nnoremap gk +:vnoremap gj +:vnoremap gk +:inoremap gj +:inoremap gk +"% colorscheme slate +:map :syntax on :colorscheme slate +"% search and replace +:map rd :.,$s///c "search and replace down +:map rg :%s///c "search and replace whole file +:map rr :rubyd gsub!(//,"") +"% pwd t64 working directory set to that of the file you're editing +"changes pwd to directory of file in current buffer +:function! CHANGE_CURR_DIR() +: let _dir = expand("%:p:h") +: exec "cd " . _dir +: unlet _dir +:endfunction +"% Change to the directory the file in your current buffer is in +:if has("autocmd") + autocmd BufEnter * :lcd %:p:h +:endif +"% autocompletefilenames To search for files in the current directory +:set path=,, +"auto-completion for file to edit in current dir, used in normal mode +:map e :e =expand("%:p:h") . "/" +:map pwd :exe 'cd ' . expand ("%:p:h") +"% searchhighlight t93: Toggle search highlight +:function! ToggleHLSearched() +: if &hls +: set nohls +: else +: set hls +: endif +:endfun +:nmap :silent call ToggleHLSearched() +"%% SiSU vim folds +"% foldsearchx FoldSearch (opens result of search all else closed) t77 +:map fs :set foldmethod=expr foldcolumn=2 foldlevel=0 +:map ff :F +:map fe :F zE +"% foldtoggle Fold Toggle mapped to +:fun! ToggleFold() +: if foldlevel('.') == 0 +: normal! l +: else +: if foldclosed('.') < 0 +: foldclose +: else +: foldopen +: endif +: endif +" Clear status line +: echo +:endfun +" Map this function to Space key. +:noremap :call ToggleFold() +"% foldtype Fold? set foldtext +:set foldtext=v:folddashes.substitute(getline(v:foldstart),'\\=','','g',) +:set foldexpr=getline(v:lnum-1)!~@/&&getline(v:lnum)!~@/&&getline(v:lnum+1)!~@/ +"% foldsearch t77: Fold on search result +:function! FoldMake(search) +: set fdm=manual +: normal zE +: normal G$ +: let folded = 0 "flag to set when a fold is found +: let flags = "w" "allow wrapping in the search +: let line1 = 0 "set marker for beginning of fold +: while search(a:search, flags) > 0 +: let line2 = line(".") +: if (line2 -1 > line1) +: "echo line1 . ":" . (line2-1) +: "echo "a fold goes here." +: execute ":" . line1 . "," . (line2-1) . "fold" +: let folded = 1 "at least one fold has been found +: endif +: let line1 = line2 "update marker +: let flags = "W" "turn off wrapping +: endwhile +" create the last fold which goes to the end of the file. +: normal $G +: let line2 = line(".") +: if (line2 > line1 && folded == 1) +: execute ":". line1 . "," . line2 . "fold" +: endif +: normal 1G +:endfunction +"% folds Fold Patterns +:command! -nargs=+ -complete=command FMake call FoldMake() +: if ( &filetype == "ruby" ) +: command! F FMake ^# ==\?\|^\s*\(\(def\|class\|module\)\s\|\(public\|protected\|private\|__END__\)\s*$\)\|\(^\s*\|\s\+\)#%\s +: command! Fa FMake \(^# ==\?\|^\s*\(\(\(def\|class\|module\)\s\)\|\(\(public\|protected\|private\|__END__\)\(\s*$\)\)\)\)\|^[0-9]\~\|\([#%]\|^["]\)\{1,4\}\s*%\|{\({\|!!\) +: command! FD FMake \(^# ==\?\|^\s*\(\(def\|class\|module\)\s\)\)\|^\s*\([#%"0-9]\{0,4\}\~\(%\+\s\|!!\)\|#\s\+=\+\s\+\) +: else +"% folds :F Fold Patterns SiSU Markup :F +: command! F FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*| +: command! Fa FMake ^\([1-8]\|:\?[A-C]\)\~\|\(^%\|\(^\|\s\+\)[#"]\)%\{1,2\}\(\s\|$\)\|^<<\s*|\|^\(Book\|Part\|Chapter\|Section\|Article\|BOOK\|PART\|CHAPTER\|SECTION\|ARTICLE\)\s +: command! F0 FMake ^\(\s*0\~\|@\S\+:[+-]\?\s\+\) +: command! FA FMake ^:\?A\~ +: command! FB FMake ^:\?[AB]\~ +: command! FC FMake ^:\?[A-C]\~ +: command! F1 FMake ^\(:\?[A-C]\|1\)\~ +: command! F2 FMake ^\(:\?[A-C]\|[12]\)\~ +: command! F3 FMake ^\(:\?[A-C]\|[1-3]\)\~ +: command! F4 FMake ^[1-4]\~ +: command! F5 FMake ^[4-5]\~ +: command! F6 FMake ^[4-6]\~ +: command! Fc FMake ^[%]\+\s\+ +: endif +"% folds Fold Patterns misc +":command! Fp FMake ^\s*[A-Za-z0-9#] +:command! Fp FMake ^\s*\S +:command! Fo FMake ^[%\"]\s*[{>] +"% cursorline +:highlight CursorLine guibg=black ctermbg=black +:highlight CursorColumn guibg=black ctermbg=black +:map cu- :set nocursorline nocursorcolumn +:map cu+ :set cursorline cursorcolumn diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim new file mode 100644 index 00000000..2b67ee1b --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -0,0 +1,210 @@ +"SiSU Vim syntax file +"SiSU Maintainer: Ralph Amissah +"SiSU Markup: SiSU (sisu-3.0.0, 2011-01-21) +"(originally looked at Ruby Vim by Mirko Nasato) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +else +endif + +" Errors: +syn match sisu_error contains=sisu_link,sisu_error_wspace "" + +" Markers Identifiers: +if !exists("sisu_no_identifiers") + syn match sisu_mark_endnote "\~^" + syn match sisu_break contains=@NoSpell "
\|
" + syn match sisu_control contains=@NoSpell "^<:p[bn]>\s*$" + syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pg\|pgn\|pn\)>\s*$" + syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pg\|pgn\|pn\)\]\s*$" + syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" + syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pr\|o\)>\s*$" + syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pr\|o\)\]\s*$" + syn match sisu_marktail "[~-]#" + syn match sisu_control "\"" + syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" + syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}" + syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+" + syn match sisu_link " \*\~\S\+" + syn match sisu_action "^<:insert\d\+>" + syn match sisu_require contains=@NoSpell "^<<\s*[a-zA-Z0-9^._-]\+\.ss[it]$" + syn match sisu_require contains=@NoSpell "^<<{[a-zA-Z0-9^._-]\+\.ss[it]}$" + syn match sisu_structure "^:A\~$" + syn match sisu_sub_header_title "^\s\+:\(subtitle\|short\|edition\|language\|lang_char\|note\):\s" "group=sisu_header_content + syn match sisu_sub_header_creator "^\s\+:\(author\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution + syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license + syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" + syn match sisu_sub_header_dates "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" + syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" + syn match sisu_sub_header_notes "^\s\+:\(abstract\comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" + syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]" + syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]" + syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]" + syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]" + syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1" + syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+" + syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1" + syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+" +endif + +"URLs Numbers And ASCII Codes: +syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" +syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" + +"Tuned Error: (is error if not already matched) +syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]" +syn match sisu_error contains=sisu_error "]" + +"Simple Paired Enclosed Markup: +"url/link +syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" +"header +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_dates matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_source matchgroup=sisu_header start="^[@]source:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +"headings +syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" +"block/group text +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table" +syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n$" +syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(block\|group\|poem\|alt\){" end="^}\(block\|group\|poem\|alt\)" +syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" +"endnotes +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n" +syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n" +syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n$" +"links and images +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|:\|\.\.\/\|#\)\S\+" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline +syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline +"some line operations +syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" +syn region sisu_normal contains=sisu_fontface,sisu_control,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$" +syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" +"font face curly brackets +"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline +syn region sisu_index matchgroup=sisu_index_block start="^={" end="}" +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*" +syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="_{" end="}_" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="/{" end="}/" +syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="+{" end="}+" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\^{" end="}\^" +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="}," +syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="#{" end="}#" +syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" +syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="" end="" oneline +"single words bold italicise etc. "workon +syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline +syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline +"misc +syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline + +"Expensive Mode: +if !exists("sisu_no_expensive") +else " not Expensive + syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline +endif " Expensive? + +"Headers And Headings: (Document Instructions) +syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+" +syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$" + +"Errors: +syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+[^:]" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+" +syn match sisu_error_wspace contains=sisu_error_wspace "\s\+$" +syn match sisu_error contains=sisu_error_wspace "\t\+" +syn match sisu_error contains=sisu_error,sisu_error_wspace "\([^ (][_\\]\||[^ (}]\)https\?:\S\+" +syn match sisu_error contains=sisu_error "_\?https\?:\S\+[}><]" +syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n$" +syn match sisu_error contains=sisu_error "^[\~]{[^{]\{-}\n$" +syn match sisu_error contains=sisu_error "\s\+.{{" +syn match sisu_error contains=sisu_error "^\~\s*$" +syn match sisu_error contains=sisu_error "^0\~.*" +syn match sisu_error contains=sisu_error "^[1-9]\~\s*$" +syn match sisu_error contains=sisu_error "^[1-9]\~\S\+\s*$" +syn match sisu_error contains=sisu_error "[^{]\~\^[^ \)]" +syn match sisu_error contains=sisu_error "\~\^\s\+\.\s*" +syn match sisu_error contains=sisu_error "{\~^\S\+" +syn match sisu_error contains=sisu_error "[_/\*!^]{[ .,:;?><]*}[_/\*!^]" +syn match sisu_error contains=sisu_error "[^ (\"'(\[][_/\*!]{\|}[_/\*!][a-zA-Z0-9)\]\"']" +syn match sisu_error contains=sisu_error "" +"errors for filetype sisu, though not error in 'metaverse': +syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>" +syn match sisu_error "/\?<\([biu]\)>[^()]\{-}\n$" + +"Error Exceptions: +syn match sisu_control "\n$" "contains=ALL +syn match sisu_control " //" +syn match sisu_error "%{" +syn match sisu_error "
_\?https\?:\S\+\|_\?https\?:\S\+
" +syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]" +syn match sisu_comment "^%\{1,2\}.\+" + +"Definitions Default Highlighting: +hi def link sisu_normal Normal +hi def link sisu_header PreProc +hi def link sisu_header_content Normal +hi def link sisu_sub_header_title Statement +hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_rights Statement +hi def link sisu_sub_header_classify Statement +hi def link sisu_sub_header_dates Statement +hi def link sisu_sub_header_make Statement +hi def link sisu_sub_header_links Statement +hi def link sisu_sub_header_publisher Statement +hi def link sisu_sub_header_notes Statement +hi def link sisu_sub_header_original Statement +hi def link sisu_sub_header_source Statement +hi def link sisu_heading Title +hi def link sisu_structure Operator +hi def link sisu_contain Include +hi def link sisu_mark_endnote Include +hi def link sisu_require NonText +hi def link sisu_link NonText +hi def link sisu_linked String +hi def link sisu_fontface Include +hi def link sisu_strikeout DiffDelete +hi def link sisu_content_alt Special +hi def link sisu_sem_content SpecialKey +hi def link sisu_sem_block Special +hi def link sisu_sem_marker Visual +"hi def link sisu_sem_marker Structure +hi def link sisu_sem_marker_block MatchParen +hi def link sisu_sem_ex_marker FoldColumn +hi def link sisu_sem_ex_marker_block Folded +hi def link sisu_sem_ex_content Comment +"hi def link sisu_sem_ex_content SpecialKey +hi def link sisu_sem_ex_block Comment +hi def link sisu_index SpecialKey +hi def link sisu_index_block Visual +hi def link sisu_content_endnote Special +hi def link sisu_control Define +hi def link sisu_ocn Include +hi def link sisu_number Number +hi def link sisu_identifier Function +hi def link sisu_underline Underlined +hi def link sisu_markpara Include +hi def link sisu_marktail Include +hi def link sisu_mark Identifier +hi def link sisu_break Structure +hi def link sisu_html Type +hi def link sisu_action Identifier +hi def link sisu_comment Comment +hi def link sisu_error_sem_marker Error +hi def link sisu_error_wspace Error +hi def link sisu_error Error +let b:current_syntax = "sisu" diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssi.tpl b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssi.tpl new file mode 100644 index 00000000..a101dee6 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssi.tpl @@ -0,0 +1,40 @@ +% SiSU 2.0 insert + +@title: #___# + :subtitle: #___# + +@creator: + :author: #___# + +@rights: + :copyright: #___# + :license: #___# + +@classify: + :topic_register: #___# + :subject: #___# + :type: #___# + :loc: #___# + :oclc: #___# + :isbn: #___# + +@date: + :published: 20YY-MM-DD + :added_to_site: 20YY-MM-DD + :modified: 20YY-MM-DD + +@make: + :headings: none; none; none; none; + :num_top: 1 + :breaks: new=:C; break=1 + :bold: / #___#/i + :italics: / #___#/i + :skin: #___# + +@links: + {SiSU}http://www.jus.uio.no/sisu/SiSU + +:A~ @title @author + +1~ #___# + diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssm.tpl b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssm.tpl new file mode 100644 index 00000000..cbda5053 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/ssm.tpl @@ -0,0 +1,40 @@ +% SiSU 2.0 master + +@title: #___# + :subtitle: #___# + +@creator: + :author: #___# + +@rights: + :copyright: #___# + :license: #___# + +@classify: + :topic_register: #___# + :subject: #___# + :type: #___# + :loc: #___# + :oclc: #___# + :isbn: #___# + +@date: + :published: 20YY-MM-DD + :added_to_site: 20YY-MM-DD + :modified: 20YY-MM-DD + +@make: + :headings: none; none; none; none; + :num_top: 1 + :breaks: new=:C; break=1 + :bold: / #___#/i + :italics: / #___#/i + :skin: #___# + +@links: + {SiSU}http://www.jus.uio.no/sisu/SiSU + +:A~ @title @author + +1~ #___# + diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/templates/sst.tpl b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/sst.tpl new file mode 100644 index 00000000..dd19efb4 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/templates/sst.tpl @@ -0,0 +1,40 @@ +% SiSU 2.0 + +@title: #___# + :subtitle: #___# + +@creator: + :author: #___# + +@rights: + :copyright: #___# + :license: #___# + +@classify: + :topic_register: #___# + :subject: #___# + :type: #___# + :loc: #___# + :oclc: #___# + :isbn: #___# + +@date: + :published: 20YY-MM-DD + :added_to_site: 20YY-MM-DD + :modified: 20YY-MM-DD + +@make: + :headings: none; none; none; none; + :num_top: 1 + :breaks: new=:C; break=1 + :bold: / #___#/i + :italics: / #___#/i + :skin: #___# + +@links: + {SiSU}http://www.jus.uio.no/sisu/SiSU + +:A~ @title @author + +1~ #___# + diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/vim-sisu.yaml b/data/sisu/v3/conf/editor-syntax-etc/vim/vim-sisu.yaml new file mode 100644 index 00000000..ca665bc8 --- /dev/null +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/vim-sisu.yaml @@ -0,0 +1,7 @@ +#vim-addons: debian vim-addon-manager +addon: sisu +description: SiSU documents - structuring, publishing in multiple formats and search +basedir: /usr/share/vim-scripts/ +files: + - ftplugin/sisu.vim + - syntax/sisu.vim -- cgit v1.2.3