Ask Your Question

roslaunch syntax highlight for qt creator

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

bvbdort gravatar image

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


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 imagemartimorta ( 2014-07-10 05:00:26 -0600 )edit

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

bvbdort gravatar imagebvbdort ( 2014-07-10 06:01:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

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

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 imageChuong Nguyen ( 2015-10-27 09:41:21 -0600 )edit

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

Nicky0201 gravatar imageNicky0201 ( 2016-11-21 21:07:19 -0600 )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 imagecbandera ( 2016-11-22 00:55:14 -0600 )edit

okay thank you

Nicky0201 gravatar imageNicky0201 ( 2016-11-22 01:19:56 -0600 )edit

answered 2014-07-11 11:22:07 -0600

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 imagebvbdort ( 2014-07-14 04:02:14 -0600 )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 -0600

Seen: 1,001 times

Last updated: Jun 29 '15