mirror of
https://github.com/gregjurman/vim-nc.git
synced 2024-12-26 03:15:49 +00:00
Merge pull request #1 from swinman/scaled_error
show scaled XYZ values as an error
This commit is contained in:
commit
ff36acaef2
@ -1,2 +1,2 @@
|
|||||||
" vim nc
|
" vim nc
|
||||||
au BufNewFile,BufRead *.nc,*.ngc setlocal nospell ft=ngc syntax=ngc
|
au BufNewFile,BufRead *.nc,*.ngc,*.NC setlocal nospell ft=ngc syntax=ngc
|
||||||
|
@ -12,7 +12,7 @@ syn case ignore
|
|||||||
|
|
||||||
syntax match ngcConstant /\(\-\=[.0-9]*\)/
|
syntax match ngcConstant /\(\-\=[.0-9]*\)/
|
||||||
syntax keyword ngcConditional if else endif
|
syntax keyword ngcConditional if else endif
|
||||||
syntax keyword ngcRepeat do while endwhile break continue end goto
|
syntax keyword ngcRepeat do do1 do2 do3 while endwhile break continue end end1 end2 end3 goto
|
||||||
syntax keyword ngcFunction sub endsub call return
|
syntax keyword ngcFunction sub endsub call return
|
||||||
syntax keyword ngcOperator EQ NE GT GE LT LE ABS ACOS ASIN ATAN COS EXP FIX FUP LN ROUND SIN SQRT TAN MOD AND OR
|
syntax keyword ngcOperator EQ NE GT GE LT LE ABS ACOS ASIN ATAN COS EXP FIX FUP LN ROUND SIN SQRT TAN MOD AND OR
|
||||||
syntax match ngcOperatorPunc "[%\-+*/\[\]]"
|
syntax match ngcOperatorPunc "[%\-+*/\[\]]"
|
||||||
@ -21,7 +21,7 @@ syntax match ngcProgramID /\(O[0-9][0-9]*\|:[0-9][0-9]*\)/
|
|||||||
syntax match ngcIdentifier /#<*[A-Z_0-9]*>*/
|
syntax match ngcIdentifier /#<*[A-Z_0-9]*>*/
|
||||||
syntax match ngcLineNumbers /\(n[0-9][0-9]*\)/
|
syntax match ngcLineNumbers /\(n[0-9][0-9]*\)/
|
||||||
syntax keyword ngcTodo TODO FIXME XXX contained
|
syntax keyword ngcTodo TODO FIXME XXX contained
|
||||||
syntax match ngcComment /(.*)/ contains=ngcTodo
|
syntax match ngcComment /([^)]*)/ contains=ngcTodo
|
||||||
syntax match ngcMessage /(\s*MSG\s*,.*)/ contains=ngcIdentifier
|
syntax match ngcMessage /(\s*MSG\s*,.*)/ contains=ngcIdentifier
|
||||||
syntax match ngcLogOpen /(\s*LOGOPEN\s*,.*)/
|
syntax match ngcLogOpen /(\s*LOGOPEN\s*,.*)/
|
||||||
syntax match ngcLogClose /(\s*LOGCLOSE\s*)/
|
syntax match ngcLogClose /(\s*LOGCLOSE\s*)/
|
||||||
@ -32,22 +32,30 @@ syntax match ngcGCodes /\s*\(g[0-9][0-9]*\)/
|
|||||||
syntax match ngcGCodesAlt /\s*\(g[0-9][0-9]*\.[0-9]\)/
|
syntax match ngcGCodesAlt /\s*\(g[0-9][0-9]*\.[0-9]\)/
|
||||||
syntax match ngcMCodes /\s*\(m[0-9][0-9]*\)/
|
syntax match ngcMCodes /\s*\(m[0-9][0-9]*\)/
|
||||||
syntax match ngcAxes /\s*\([abc][-#]*[0-9.][.]*[0-9]*\)/ contains=ngcIdentifier
|
syntax match ngcAxes /\s*\([abc][-#]*[0-9.][.]*[0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcXAxis /\s*\([xui][-#]*[0-9.][.]*[0-9]*\)/ contains=ngcIdentifier
|
syntax match ngcXAxisScaled /\s*\([xui] *[-+#]\?[1-9][0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcYAxis /\s*\([yvj][-#]*[0-9.][.]*[0-9]*\)/ contains=ngcIdentifier
|
syntax match ngcYAxisScaled /\s*\([yvj] *[-+#]\?[1-9][0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcZAxis /\s*\([zwk][-#]*[0-9.][.]*[0-9]*\)/ contains=ngcIdentifier
|
syntax match ngcZAxisScaled /\s*\([zwk] *[-+#]\?[1-9][0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcSpecials /\s*\(,[c][#-]*[0-9.][.]*[0-9]*\|[relpqds][-#]*[0-9.][.]*[0-9]*\)\s*/ contains=ngcIdentifier
|
syntax match ngcFeedScaled /\s*\(f *#\?[1-9][0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcFeed /\s*\([f][0-9.][.]*[0-9]*\)/
|
syntax match ngcXAxis /\s*\([xui] *[-+#]\?[0-9]*\.[0-9]*\)/ contains=ngcIdentifier
|
||||||
syntax match ngcTool /[ht][0-9][0-9]*/
|
syntax match ngcYAxis /\s*\([yvj] *[-+#]\?[0-9]*\.[0-9]*\)/ contains=ngcIdentifier
|
||||||
|
syntax match ngcZAxis /\s*\([zwk] *[-+#]\?[0-9]*\.[0-9]*\)/ contains=ngcIdentifier
|
||||||
|
syntax match ngcFeed /\s*\([f] *[#]\?[0-9]*\.[0-9]*\)/ contains=ngcIdentifier
|
||||||
|
syntax match ngcSpecials /\s*\(,[c][#-]*[0-9.][.]*[0-9]*\|[relpqs][-#]*[0-9.][.]*[0-9]*\)\s*/ contains=ngcIdentifier
|
||||||
|
syntax match ngcTool /[hdt][0-9][0-9]*/
|
||||||
syntax match ngcBlockSkip /^\/.*/
|
syntax match ngcBlockSkip /^\/.*/
|
||||||
|
|
||||||
highlight ngcFileBlock ctermfg=White ctermbg=Red cterm=bold
|
hi link ngcXAxisScaled Error
|
||||||
highlight ngcProgramID ctermfg=White cterm=bold
|
hi link ngcYAxisScaled Error
|
||||||
highlight ngcXAxis ctermfg=34
|
hi link ngcZAxisScaled Error
|
||||||
highlight ngcYAxis ctermfg=20
|
hi link ngcFeedScaled Error
|
||||||
highlight ngcZAxis ctermfg=124
|
highlight ngcFileBlock ctermfg=white ctermbg=red cterm=bold
|
||||||
highlight ngcAxes ctermfg=102
|
highlight ngcProgramID ctermfg=white cterm=bold
|
||||||
highlight ngcSpecials ctermfg=101
|
highlight ngcXAxis ctermfg=darkgreen
|
||||||
highlight ngcBlockSkip ctermfg=White cterm=bold
|
highlight ngcYAxis ctermfg=darkblue
|
||||||
|
highlight ngcZAxis ctermfg=red
|
||||||
|
highlight ngcAxes ctermfg=lightgreen
|
||||||
|
highlight ngcSpecials ctermfg=brown
|
||||||
|
highlight ngcBlockSkip ctermfg=white cterm=bold
|
||||||
highlight link ngcConstant Constant
|
highlight link ngcConstant Constant
|
||||||
highlight link ngcConditional Conditional
|
highlight link ngcConditional Conditional
|
||||||
highlight link ngcRepeat Repeat
|
highlight link ngcRepeat Repeat
|
||||||
@ -56,7 +64,7 @@ highlight link ngcOperator Operator
|
|||||||
highlight link ngcOperatorPunc Operator
|
highlight link ngcOperatorPunc Operator
|
||||||
highlight link ngcIdentifier Identifier
|
highlight link ngcIdentifier Identifier
|
||||||
highlight link ngcLabel Label
|
highlight link ngcLabel Label
|
||||||
highlight link ngcLineNumbers Label
|
highlight link ngcLineNumbers LineNr
|
||||||
highlight link ngcTodo Todo
|
highlight link ngcTodo Todo
|
||||||
highlight link ngcComment Comment
|
highlight link ngcComment Comment
|
||||||
highlight link ngcMessage SpecialComment
|
highlight link ngcMessage SpecialComment
|
||||||
@ -69,7 +77,7 @@ highlight link ngcGCodes Keyword
|
|||||||
highlight link ngcGCodesAlt Keyword
|
highlight link ngcGCodesAlt Keyword
|
||||||
highlight link ngcMCodes Keyword
|
highlight link ngcMCodes Keyword
|
||||||
highlight link ngcAxes SpecialChar
|
highlight link ngcAxes SpecialChar
|
||||||
highlight ngcFeed ctermfg=89
|
highlight ngcFeed ctermfg=magenta
|
||||||
highlight ngcTool ctermfg=94
|
highlight link ngcTool EnumeratorName
|
||||||
|
|
||||||
let b:current_syntax = "ngc"
|
let b:current_syntax = "ngc"
|
||||||
|
Loading…
Reference in New Issue
Block a user