Updated.
This commit is contained in:
parent
9538b2983f
commit
af2862d0d0
@ -8,7 +8,7 @@ endif
|
|||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
setlocal formatoptions-=t
|
setlocal formatoptions-=t
|
||||||
setlocal iskeyword=46,58,44,40,41,34,91,92
|
setlocal iskeyword=46,58,44,40,41,34,91,92,93
|
||||||
|
|
||||||
|
|
||||||
let b:undo_ftplugin = "setlocal formatoptions<"
|
let b:undo_ftplugin = "setlocal formatoptions<"
|
||||||
|
@ -24,7 +24,9 @@ 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 =~ ':\s*\($\|#\)' || previous =~ '(\.\.)\s*\($\|#\)'
|
||||||
|
\ || previous =~ '\[\.\.\]\s*\($\|#\)' || previous =~ '"\.\."\s*\($\|#\)'
|
||||||
|
\ || previous =~ '#\.\..*$'
|
||||||
let ind += &tabstop
|
let ind += &tabstop
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -14,36 +14,37 @@ hi def link nomsuInterpDelim PreProc
|
|||||||
syn region nomsuOneLineComment start=/#\(\.\.\)\@!/ end=/$/
|
syn region nomsuOneLineComment start=/#\(\.\.\)\@!/ end=/$/
|
||||||
hi nomsuOneLineComment ctermfg=DarkBlue
|
hi nomsuOneLineComment ctermfg=DarkBlue
|
||||||
hi def link nomsuOneLineComment Comment
|
hi def link nomsuOneLineComment Comment
|
||||||
syn region nomsuComment start=/\(\n\z(\s*\)[^\n]*\)\@<=#\.\./ skip=/\n\s*$/ end=/\n\(\z1\s\)\@!/
|
syn region nomsuComment start=/\(^\z(\s*\)[^\n]*\)\@<=#\.\./ skip=/\n\s*$/ end=/\n\(\z1\s\)\@!/
|
||||||
hi nomsuComment ctermfg=DarkBlue
|
hi nomsuComment ctermfg=DarkBlue
|
||||||
hi def link nomsuComment Comment
|
hi def link nomsuComment Comment
|
||||||
|
|
||||||
|
|
||||||
syn region nomsuShortString start=/\("\.\.\)\@<!"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/"/
|
|
||||||
hi nomsuShortString ctermfg=Magenta
|
|
||||||
hi def link nomsuShortString String
|
|
||||||
|
|
||||||
|
|
||||||
syn match nomsuLongStringStart /"\.\."/ contains=nomsuIndentor contained
|
syn match nomsuLongStringStart /"\.\."/ contains=nomsuIndentor contained
|
||||||
hi nomsuLongStringStart ctermfg=Yellow
|
hi nomsuLongStringStart ctermfg=Yellow
|
||||||
syn match nomsuStringPipe /|/ contained
|
syn match nomsuStringPipe /|/ contained
|
||||||
hi nomsuStringPipe ctermfg=DarkGray
|
hi nomsuStringPipe ctermfg=DarkGray
|
||||||
|
syn match nomsuStringBackslash /\\\\/ contained
|
||||||
|
hi nomsuStringBackslash ctermbg=Black ctermfg=Blue
|
||||||
|
syn match nomsuStringEscapedQuote /\\"/ contained
|
||||||
|
hi nomsuStringEscapedQuote ctermbg=Black ctermfg=Blue
|
||||||
hi def link nomsuStringPipe Special
|
hi def link nomsuStringPipe Special
|
||||||
syn region nomsuInterp matchgroup=nomsuInterpDelim start=/\\/ end=/\\/ contained
|
syn region nomsuInterp matchgroup=nomsuInterpDelim start=/\\(/ end=/)/ contained
|
||||||
\ contains=@nomsuAll
|
\ contains=@nomsuAll
|
||||||
syn region nomsuLongStringValue start=/\(|\)\@<=/ end=/\(\n\)\@=/ contained
|
syn region nomsuLongStringValue start=/\(|\)\@<=/ end=/$/ contained
|
||||||
\ contains=nomsuInterp
|
\ contains=nomsuInterp,nomsuStringBackslash
|
||||||
hi nomsuLongStringValue ctermbg=Black ctermfg=Gray
|
hi nomsuLongStringValue ctermbg=Black ctermfg=Gray
|
||||||
hi def link nomsuLongStringValue String
|
hi def link nomsuLongStringValue String
|
||||||
syn region nomsuLongStringFirstLine start=/\("\.\."\s*\)\@<=|/ end=/$/ contained
|
syn region nomsuLongStringLine start=/^\s\+|/ end=/\n/ contained
|
||||||
\ contains=nomsuStringPipe,nomsuLongStringValue
|
|
||||||
syn region nomsuLongStringLine start=/^\s\+|/ end=/$/ contained
|
|
||||||
\ contains=nomsuStringPipe,nomsuLongStringValue
|
\ contains=nomsuStringPipe,nomsuLongStringValue
|
||||||
syn region nomsuLongString start=/\(^\z(\s*\)[^\n]*\)\@<="\.\."/ skip=/^\s*$/ end=/^\(\z1\s\)\@!/
|
syn region nomsuLongString start=/\(^\z(\s*\)[^\n]*\)\@<="\.\."/ skip=/^\s*$/ end=/^\(\z1\s\)\@!/
|
||||||
\ contains=nomsuLongStringStart,nomsuOneLineComment,nomsuComment,nomsuLongStringLine,nomsuLongStringFirstLine
|
\ contains=nomsuLongStringStart,nomsuOneLineComment,nomsuComment,nomsuLongStringLine
|
||||||
|
|
||||||
|
syn region nomsuString start=/\("\.\.\)\@<!"\(\.\."\)\@!/ skip=/\\\\\|\\"/ end=/$\|"/
|
||||||
|
\ contains=nomsuInterp,nomsuStringBackslash,nomsuStringEscapedQuote
|
||||||
|
hi nomsuString ctermbg=Black ctermfg=Gray
|
||||||
|
hi def link nomsuString String
|
||||||
|
|
||||||
syn match nomsuVar /\v\%[a-zA-Z0-9`~!@^&*_+=|<>?'-][a-zA-Z0-9`~!@^&*_+=|<>?-]*/
|
syn match nomsuVar /%\([a-zA-Z0-9`~!@^&*_+=|<>?-]*\)\?/
|
||||||
hi nomsuVar ctermfg=Cyan
|
hi nomsuVar ctermfg=Cyan
|
||||||
hi def link nomsuVar Identifier
|
hi def link nomsuVar Identifier
|
||||||
|
|
||||||
@ -56,11 +57,11 @@ syn match nomsuNumber /-\?\d\+\(\.\(\d\+\)\?\)\?/
|
|||||||
syn match nomsuNumber /-\?\.\d\+/
|
syn match nomsuNumber /-\?\.\d\+/
|
||||||
hi def link nomsuNumber Number
|
hi def link nomsuNumber Number
|
||||||
|
|
||||||
syn match nomsuIndentor /\.\./
|
syn match nomsuDotDot /\.\./
|
||||||
hi def link nomsuIndentor Special
|
hi def link nomsuDotDot Special
|
||||||
hi nomsuIndentor ctermfg=DarkGray
|
hi nomsuDotDot ctermfg=DarkGray
|
||||||
|
|
||||||
syn match nomsuDelim /[,()\[\]]/
|
syn match nomsuDelim /[,;()\[\]]/
|
||||||
hi nomsuDelim ctermfg=Yellow
|
hi nomsuDelim ctermfg=Yellow
|
||||||
hi def link nomsuDelim Delimiter
|
hi def link nomsuDelim Delimiter
|
||||||
|
|
||||||
@ -68,8 +69,8 @@ syn match nomsuThunk /:/
|
|||||||
hi nomsuThunk ctermfg=Yellow
|
hi nomsuThunk ctermfg=Yellow
|
||||||
hi def link nomsuThunk Structure
|
hi def link nomsuThunk Structure
|
||||||
|
|
||||||
syn cluster nomsuAll contains=nomsuShortString,nomsuLongString,nomsuComment,nomsuOneLineComment,
|
syn cluster nomsuAll contains=nomsuString,nomsuLongString,nomsuComment,nomsuOneLineComment,
|
||||||
\ nomsuVar,nomsuNumber,nomsuDelim,nomsuThunk,nomsuIndentor,nomsuWord
|
\ nomsuVar,nomsuNumber,nomsuDelim,nomsuThunk,nomsuDotDot,nomsuWord
|
||||||
|
|
||||||
if !exists('b:current_syntax')
|
if !exists('b:current_syntax')
|
||||||
let b:current_syntax = 'nomsu'
|
let b:current_syntax = 'nomsu'
|
||||||
|
Loading…
Reference in New Issue
Block a user