[ros-users] rosemacs additions

Brian Gerkey gerkey at willowgarage.com
Wed Sep 15 16:11:19 UTC 2010


hi Benjamin,

These changes sounds useful.  Could you file a ticket?
https://code.ros.org/trac/ros/newticket

For specific enhancements (or bugs) like this, it's best to file
tickets.  That way we won't lose track of it.

	brian.

On Wed, Sep 15, 2010 at 8:08 AM, Axelrod, Benjamin <baxelrod at irobot.com> wrote:
> I’d like to request some useful additions to rosemacs.el:
>
>
>
> ;; Add ROS *.launch, *.urdf, and *.xacro files to xml mode
>
> (add-to-list 'auto-mode-alist '("\\.launch\\'" . xml-mode))
>
> (add-to-list 'auto-mode-alist '("\\.urdf\\'" . xml-mode))
>
> (add-to-list 'auto-mode-alist '("\\.xacro\\'" . xml-mode))
>
>
>
> ;; Add ROS message files to gdb-script mode for syntax highlighting
>
> (add-to-list 'auto-mode-alist '("\\.msg\\'" . gdb-script-mode))
>
> (add-to-list 'auto-mode-alist '("\\.srv\\'" . gdb-script-mode))
>
> (add-to-list 'auto-mode-alist '("\\.action\\'" . gdb-script-mode))
>
>
>
> These enable useful syntax highlighting in ros specific files.  I found that
> gdb-script-mode colors message files very nicely.  (Comments are red, field
> types are purple, field names are black.)  Ideally, I guess there should be
> a ros-message-mode with its own font-lock rules.  But this seems to be
> sufficient for now.  To make gdb-script-mode even more ros-centric, you can
> add ros’s standard message types to a different font-lock font face.  This
> will make standard field types like “bool” and “int8” pink instead of
> purple:
>
>
>
> ;; Add ROS standard message types to gdb-script-mode for different
> highlighting
>
> (font-lock-add-keywords 'gdb-script-mode
>
>
> '(("\\<\\(bool\\|int8\\|uint8\\|int16\\|uint16\\|int32\\|uint32\\|int64\\|uint64\\|float32\\|float64\\|string\\|time\\|duration\\)\\>"
> . font-lock-builtin-face)))
>
>
>
> Enjoy,
>
> -Ben
>
>
>
> Ben Axelrod
>
> Research Scientist
>
> iRobot Corporation
>
> 8 Crosby Drive, Mail Stop 8-1
>
> Bedford, MA 01730
>
> (781) 430-3315 (Tel)
>
> (781) 960-2628 (Fax)
>
> baxelrod at irobot.com
>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>



More information about the ros-users mailing list