Updated comment syntax and a few other bits.
This commit is contained in:
parent
8f91b49285
commit
9a64d8f36c
@ -24,7 +24,7 @@ function! GetNomsuIndent()
|
|||||||
let previous = getline(previousNum)
|
let previous = getline(previousNum)
|
||||||
let ind = indent(previousNum)
|
let ind = indent(previousNum)
|
||||||
|
|
||||||
if previous =~ ':$' || previous =~ '\.\.$' || previous =~ '(\.\.)$' || previous =~ '\[\.\.\]$' || previous =~ '"\.\."$'
|
if previous =~ ':$' || previous =~ '\.\.$' || previous =~ '(\.\.)$' || previous =~ '\[\.\.\]$' || previous =~ '"\.\."$' || previous =~ '#\.\..*$'
|
||||||
let ind += &tabstop
|
let ind += &tabstop
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -9,15 +9,30 @@ endif
|
|||||||
|
|
||||||
" Highlight long strings.
|
" Highlight long strings.
|
||||||
syn sync minlines=100
|
syn sync minlines=100
|
||||||
|
"highlight String ctermbg=DarkBlue ctermfg=Black
|
||||||
|
|
||||||
" Regular strings
|
" Regular strings
|
||||||
|
"
|
||||||
|
syn region nomsuInterp matchgroup=nomsuInterpDelim start=/#{/ end=/}/ contained
|
||||||
|
\ contains=@nomsuAll
|
||||||
|
hi def link nomsuInterpDelim PreProc
|
||||||
|
syn region nomsuOneLineComment start=/#/ end=/$/
|
||||||
|
hi def link nomsuOneLineComment Comment
|
||||||
|
syn region nomsuComment start=/#\.\.[^\n]*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1
|
||||||
|
hi def link nomsuComment Comment
|
||||||
|
|
||||||
syn region nomsuString1 start=/"/ skip=/\\\\\|\\"/ end=/"/
|
syn region nomsuString1 start=/"/ skip=/\\\\\|\\"/ end=/"/
|
||||||
hi def link nomsuString1 String
|
hi def link nomsuString1 String
|
||||||
syn region nomsuString2 start=/"\.\."/ end=/\(\n[ \t]*[^ \t|]\)\@=/
|
|
||||||
|
syn match nomsuStringLineStart /^[ \t]*|/ contained
|
||||||
|
hi def link nomsuStringLineStart Delimiter
|
||||||
|
syn match nomsuStringTrailingSpace /[ \t]*$/ contained
|
||||||
|
hi nomsuStringTrailingSpace ctermbg=Magenta
|
||||||
|
|
||||||
|
|
||||||
|
syn region nomsuString2 start=/"\.\."\s*$\n\(\s*\n\)*\z(\s\+\)\S/ skip=/^\%(\z1\S\|^\s*$\)/ end=/^\z1\@!.*/me=s-1
|
||||||
|
\ contains=nomsuInterp,nomsuStringLineStart,nomsuStringTrailingSpace
|
||||||
hi def link nomsuString2 String
|
hi def link nomsuString2 String
|
||||||
syn region nomsuComment start=/(#/ end=/#)/ contains=nomsuComment
|
|
||||||
hi def link nomsuComment Comment
|
|
||||||
|
|
||||||
syn match nomsuVar /\v\%[a-zA-Z0-9_'+*/^&$@#-]*/
|
syn match nomsuVar /\v\%[a-zA-Z0-9_'+*/^&$@#-]*/
|
||||||
hi def link nomsuVar Identifier
|
hi def link nomsuVar Identifier
|
||||||
@ -44,6 +59,9 @@ hi def link nomsuThunk Structure
|
|||||||
syn match nomsuToken /\v(\%)@<!\%[a-zA-Z_'+*/^&$@#-][a-zA-Z0-9_'+*/^&$@#-]*/
|
syn match nomsuToken /\v(\%)@<!\%[a-zA-Z_'+*/^&$@#-][a-zA-Z0-9_'+*/^&$@#-]*/
|
||||||
hi def link nomsuToken Function
|
hi def link nomsuToken Function
|
||||||
|
|
||||||
|
syn cluster nomsuAll contains=nomsuString1,nomsuString2,nomsuComment,nomsuVar,nomsuNumber,
|
||||||
|
\ nomsuComma,nomsuThunk,nomsuIndentor,nomsuToken
|
||||||
|
|
||||||
if !exists('b:current_syntax')
|
if !exists('b:current_syntax')
|
||||||
let b:current_syntax = 'nomsu'
|
let b:current_syntax = 'nomsu'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user