Ask Your Question

roslaunch syntax highlight for qt creator

asked 2014-07-10 04:37:32 -0500

bvbdort gravatar image

updated 2014-07-10 04:47:38 -0500


Did someone used roslaunch syntax highlight in qt creator ? How to do it ?


edit retag flag offensive close merge delete



I am not using qt creator but roslaunch is XML

martimorta gravatar image martimorta  ( 2014-07-10 05:00:26 -0500 )edit

i am using qt creator but its not detecting .launch extension as xml

bvbdort gravatar image bvbdort  ( 2014-07-10 06:01:04 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2019-11-18 10:58:42 -0500

max11gen gravatar image

updated 2019-12-13 07:06:50 -0500

The solution mentioned here to use Tools->Options->Generic Highlighter path and copying a file didn't work for me, because that path is just empty.
What actually worked was this:
1. Going to Tools->Options->Environment->MIME Types
2. Filter for xml
3. Click on the entry "application/xml
4. in The field "Patterns" append ";*.launch" to the already existing patterns

edit flag offensive delete link more


I also couldn't find the xml.xml and this answer worked for me.

alex_ gravatar image alex_  ( 2019-12-13 04:17:03 -0500 )edit

answered 2015-06-29 08:00:23 -0500

cbandera gravatar image

The solution that worked for me was:

  1. Find out, where your Syntax Highlight Definition Files are located by navigating to: Tools->Options->Text Editor->Generic Highlighter and note the given paths.
  2. Find the syntax file for xml: xml.xml in one of the paths noted above.
  3. You can either edit this file directly or make a copy and name it launch.xml (You might need sudo to do this). Then edit the line that starts with <language name="XML" by adding *.launch to the extensions="... argument. Mine looks like this now:

<language name="XML" version="2.03" kateversion="2.4" section="Markup" extensions="*.launch;*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/xml" casesensitive="1" author="Wilbert Berendsen (" license="LGPL">

edit flag offensive delete link more


it works after restart QT, thank you.

Chuong Nguyen gravatar image Chuong Nguyen  ( 2015-10-27 09:41:21 -0500 )edit

I am not able to edit the file ..... is this common?

Nicky0201 gravatar image Nicky0201  ( 2016-11-21 21:07:19 -0500 )edit

Hi @Nicky0201, you probably don't have the necessary rights. As I mentioned in my answer, you can try editing the file, using the sudo command in the terminal.

cbandera gravatar image cbandera  ( 2016-11-22 00:55:14 -0500 )edit

okay thank you

Nicky0201 gravatar image Nicky0201  ( 2016-11-22 01:19:56 -0500 )edit

answered 2014-07-11 11:22:07 -0500

allenh1 gravatar image

The way to get syntax highlighting is actually pretty simple. Open QtCreator and go to Tools->Options->Generic Highlighter. Then navigate to whatever directory is listed. Lastly,

cp xml.xml launch.xml

You may need to sudo that command, depending on where it is installed. After that, you should be good.

edit flag offensive delete link more


thanks for reply but it didnt work.

bvbdort gravatar image bvbdort  ( 2014-07-14 04:02:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-07-10 04:37:32 -0500

Seen: 1,380 times

Last updated: Dec 13 '19