Skip to content

Commit

Permalink
Highlight comment blocks (/* ... */)
Browse files Browse the repository at this point in the history
Works with single line or multi line comment blocks that look like this:

```
/**
 * This is my
 * comment
 */
```
  • Loading branch information
cyberang3l committed Dec 17, 2024
1 parent 2b3b5df commit 8e7e3ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion syntax/monkey-c.vim
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ syntax match monkeyCNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
syntax match monkeyCNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
syntax match monkeyCLabel ":\w\+"
syntax match monkeyCComment "\v//.*$"
syntax region monkeyCCommentBlock start="/\*" end="*/"

highlight link monkeyCString String
highlight link monkeyCCharacter Character
Expand All @@ -54,6 +55,6 @@ highlight link monkeyCOperator Operator
highlight link monkeyCNumber Number
highlight link monkeyCLabel Label
highlight link monkeyCComment Comment
highlight link monkeyCCommentBlock Comment

let b:current_syntax = "monkey-c"

0 comments on commit 8e7e3ed

Please sign in to comment.