When I'm writing Latex files in vim, the syntax highlighting recognizes
\newcommand as the start of a new command environment, but not
\newcommand*. Digging into the syntax file, it seems that to fix this I want to replace the line
syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl
syn match texNewCmd "\\newcommand\*\=\>" nextgroup=texCmdName skipwhite skipnl
I'd prefer it if rather than editing the existing syntax file directly, I could include this change in a separate file. I read that by adding a separate
tex.vim file in the
~/.vim/after/syntax folder I can include small changes to the syntax highlighting, but that doesn't seem to be working. Is there a way to change what this group is matched to without editing it directly in the included syntax file?