first:
I want to add support for openMP in fortran with sublime text3.
The lines I want to match is:
!$OMP some key words
I got a package named minimalfortran, copied MinimalFortran.JSON-tmLanguage to my packages/user folder, add these lines to the end of it.
{
"comment": "openMP controls",
"match": "!\\$OMP .+",
"name": "keyword.control.openMP.fortran"
},
It does not work, I thought it may because of these lines:
{
"begin": "!]",
"beginCaptures": {
"0": {
"name": "punctuation.definition.comment.fortran"
}
},
"end": "$\\n?",
"name": "comment.line.asterisk.fortran",
"patterns":
{
"match": "\\\\\\s*\\n"
}
]
},
It seems I can not overwrite it, or something wrong with my tmlanguage syntax.
second:
I want to add a shortcut for comment / uncomment in Fortran, how can I do this?