Sublime Forum

Native support for QML highlighting

#1

Please, add built-in syntax highlighting for QML programming language.

0 Likes

#2

There appears to be an existing QML package.

0 Likes

#3

Yes, there is a package (I’m aware of that). I use Qt Creator for QML programming, but still I use sublime text to take a quick look at files and so (in order to reuse code and that stuffs) because Sublime Text it’s so fast and beautiful. Then installing a package is not as convenient as having a basic syntax highlighting. I currently use JS syntax highlighting and it’s works pretty well over QML, but I have to set it manually after open a .qml file.
So, my request is for a out-of-the-box, built-in syntax highlighting for QML.

0 Likes

#4

1 Like

#5

Yes, and this can apply to any plugin on Package Control. Please make all of them built-in. :grinning:

0 Likes

#6

Thanks, that’s a nice workaround for me.

0 Likes

#7

Don’t be so sarcastic, please. I’m just requesting a basic syntax highlighting, not a full-featured plugin with debugging and analysis tools, I mean, not an embedded Visual Studio :wink:. Sublime Text has basic syntax highlighting definition for a lot of languages, some of them less popular than QML. Qt is a widely used framework and QML is also widely used to desktop and embedded programming. Also, as QML syntax is based on JS and JSON, it should not be so difficult to add.

0 Likes

#8

I believe there are many basic syntax highlighting that you are not interested in.
https://packagecontrol.io/search/syntax

2 Likes

#9

I think it’s very unlikely that Sublime will add QML support into core. Every core language has to be maintained and supported indefinitely.

You mention that Sublime provides a core syntax for some languages that are less common than QML. The flip side of this is that Sublime does not provide a core syntax for many languages that are more common than QML. If Sublime were to start directly supporting additional core syntaxes, then there are other languages that would provide a much greater benefit for the same maintenance cost.

I think that if Sublime were created from scratch today, then it would provide fewer core syntaxes, not more.

1 Like

#10

Thanks, that is a great answer.

Thanks again for that answer. What you just said makes perfect sense.

0 Likes

#11

One thing i’ve never understood is why a so well architected piece of software such as QtCreator has such an useless text editor :confused: , people have opened tickets about it ages ago about improving multiselection on qtcreator but only they’ve given it’s been the useless rectangular selections.

Solution? Use sublime text to code Qt applications :stuck_out_tongue:

0 Likes

#12

While I agree that having a multi-selection will be a very helpful feature (I have already requested that), I think that calling it useless is extreme. There are some features that Qt’s text editor have that makes it my choice to develop Qt apps:

  1. [The most important feature] Excellent refactoring by pressing Alt+Return. A lot better than all C++ & QML packages (that I’ve tested) in Sublime.
  2. Great navigation with just pressing Ctrl and clicking any variable/function, etc.
  3. Great clang integration, with real-time compilation and very expressive (colored) errors and warnings

I also have some complains about the Git integration. Hope this will be improved in the release of Qt6.

Note: I’m using Qt 5.12.2.

0 Likes

#13

You’re right, I think the term “useless” has been a bit rude… I’ve got quite a lot of respect about Qt software engineers and usually they do things the right way, so I take that word back :slight_smile:

In any case, I think QtCreator has many features that are much better to VisualStudio’s… and although both IDEs are great their text editors lack behind in comparison to the mighty SublimeText, I think that has been just a wrong strategy from Nokia&Ms. SublimeText has been released in 2007, that’s quite a lot of time… both companies have had more than enough time to emulate some of the best SublimeText features in their editors, they didn’t… why? The text editor is the most important widget in a IDE yet their text editors are not so powerful as Sublime.

I’d put my finger on it that SublimeText could become a proper IDE to develop Qt apps if you put enough love coding/using the right plugins but rewriting/improving QtCreator|VisualStudio’s text editor widget sounds to me a much more challenging task…

Also… you’re using SublimeText as a QtCreator extension, ask yourself why… :wink:

0 Likes

#14

Because Sublime’s text editor features are the best!!!

0 Likes