about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/subx.vim3
-rw-r--r--vimrc.vim3
2 files changed, 4 insertions, 2 deletions
diff --git a/subx/subx.vim b/subx/subx.vim
index 0bdeba80..0ba55cd9 100644
--- a/subx/subx.vim
+++ b/subx/subx.vim
@@ -28,6 +28,7 @@ let b:cmt_head = "#? "
 syntax match subxDelimiter / \. /  | highlight link subxDelimiter Delimiter
 
 syntax match subxString %"[^"]*"% | highlight link subxString Constant
-syntax match subxGlobal %\<[A-Z][a-z-]*\>% | highlight link subxGlobal SpecialChar
+" match globals but not registers like 'EAX'
+syntax match subxGlobal %\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar
 
 let &cpo = s:save_cpo
diff --git a/vimrc.vim b/vimrc.vim
index 87bb6d8c..8bb5bbfe 100644
--- a/vimrc.vim
+++ b/vimrc.vim
@@ -41,7 +41,8 @@ function! HighlightTangledFile()
   syntax match muData "^type\>\|^container\>\|^exclusive-container\>" | highlight muData ctermfg=226
 
   syntax match subxString %"[^"]*"% | highlight link subxString Constant
-  syntax match subxGlobal %\<[A-Z][a-z-]*\>% | highlight link subxGlobal SpecialChar
+  " match globals but not registers like 'EAX'
+  syntax match subxGlobal %\<[A-Z][a-z0-9_-]*\>% | highlight link subxGlobal SpecialChar
 endfunction
 augroup LocalVimrc
   autocmd BufRead,BufNewFile *.mu set ft=mu