2

I need a tabTrigger that starts with a * character but it won't work. Already tried to escape it * but it doesn't work either. Ideas?

<snippet>
    <content><![CDATA[
*CLOAD, KEYWORD1=${1:VALUE1}, KEYWORD2=${2:VALUE2}
]]></content>
    <tabTrigger>*CLOAD</tabTrigger>
    <scope>text.abaqus</scope>
    <description>CLOAD Keyword</description>
</snippet>
SenhorLucas
  • 1,337
  • 12
  • 12

1 Answers1

0

After reading sergioFC's comment, I tested the snippet in your question, and when I commented out the <scope> line, it worked fine. So, I suspect the issue isn't with the asterisk (* character), but with the scope. I had never heard of Abacus, and I still can't find a language syntax for Sublime or TextMate (although I did find an extremely minimal one for Atom, and keywords for NotePad++), but apparently its grammar is similar to Fortran. Correct me if I'm wrong.

At any rate, the language syntax you are using is most likely scoped as source.abaqus rather than text.abacus. source is used for source code, whereas text is used for things like Plain text, HTML, Markdown, LaTeX, etc. You can either leave the scope blank, at the risk of triggering your snippet(s) in other languages, or you can change it to source.abaqus. To find out for sure what the base scope is, you can use the following key combos to display the full scope at the cursor in the status bar at the bottom of the window:

  • Windows/Linux: CtrlAltShiftP
  • OS X: CtrlShiftP
Community
  • 1
  • 1
MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • Thanks for your answer @MattDMo. This didn't work though. I am developing the syntax for abaqus from scratch, since there is nothing available yet. I changed the scopeName at my tmLanguage file to source.abaqus, then I changed the scope in the snipped. No luck... Abaqus is a Finite Element solver used in mechanical engineering. It takes an input file that is very similar indeed to fortran. – SenhorLucas Dec 01 '15 at 14:03
  • @SenhorLucas can you give me a link to your repo so I can check out the `tmLanguage` file? Also, could you add some example files so I can test them? I'm the maintainer of [Python Improved](https://packagecontrol.io/packages/Python%20Improved), which I've been working on for a little over 2 years now, so I might be able to give you some pointers. – MattDMo Dec 01 '15 at 14:42