587,768 active members*
3,718 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > gtksourceview-2.0 (gedit) gcode syntax coloring.
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2005
    Posts
    55

    gtksourceview-2.0 (gedit) gcode syntax coloring.

    Hi,

    I was not able to find a syntax coloring definition for gcode in gtksourceview (gedit) so I made one.

    It helps me when I´m reading through my gcode so I thought It might help others if I shared it..

    it´s far from perfect, but it´s a start

    http://dl.dropbox.com/u/22370817/ngc.lang

    drop it in either .gnome2/gtksourceview-2.0/language-specs/ or /usr/share/gtksourceview-2.0/language-specs/

    Henrik
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2009
    Posts
    1416
    Cool that I'll have to give a shot.
    CNC: Making incorrect parts and breaking stuff, faster and with greater precision.

  3. #3
    Join Date
    May 2005
    Posts
    1662
    This adds a menu item but doesn't seem to do anything else
    Did you upload the wrong file or is it a work in progress ? Maybe it's something I'm doing wrong ?
    Anyone who says "It only goes together one way" has no imagination.

  4. #4
    Join Date
    Jun 2005
    Posts
    55
    Hmm.. no, it is the same file I´m using.

    What file suffix do use? the files supported now is "*.ngc;*.nc;*.cnc;*.tap", but it is very easy to add more.

    Henrik

  5. #5
    Join Date
    May 2005
    Posts
    1662
    There are a couple of others available.

    one from the linuxcnc wiki
    EMC Documentation Wiki: Highlighting In Gedit

    and another from the inkscape gcode developer (Gcode tools)
    cnc-club.ru •

    They look rather easy to customize with a bit of knowledge of regular expressions. I'd like to see one that has separate colors for letters X,Y and Z as seen in some other gcode editors.
    Anyone who says "It only goes together one way" has no imagination.

  6. #6
    Join Date
    Jun 2005
    Posts
    55
    wow, and I thought I did a thorough search for this before I made my lang file they both look way better than mine.

    This should really be a part of the ubuntu-distro available at linuxcnc.org

    H.

  7. #7
    Join Date
    May 2005
    Posts
    1662
    Quote Originally Posted by cyclestart View Post
    I'd like to see one that has separate colors for letters X,Y and Z as seen in some other gcode editors.
    That was easier than I thought
    Attached Thumbnails Attached Thumbnails gedit_gcode.png  
    Anyone who says "It only goes together one way" has no imagination.

  8. #8
    Join Date
    Jun 2005
    Posts
    55
    Yep, simple and helpful nice! too bad it's hidden away like that.

    I'm working on a script to make it easier to install such "features" on a vanilla emc2 ubuntu.

    Any tips on features that will be helpful? what are the first thing you do after a fresh install?

    Henrik

Similar Threads

  1. Coloring Gold or Platinum
    By tung in forum Material Machining Solutions
    Replies: 1
    Last Post: 03-08-2010, 12:18 AM
  2. Coloring brass
    By ErnieD in forum Material Machining Solutions
    Replies: 2
    Last Post: 02-14-2010, 04:41 PM
  3. Using Gedit without EMC2 to manually edit Gcode with syntax
    By mouratoglou in forum LinuxCNC (formerly EMC2)
    Replies: 6
    Last Post: 07-25-2009, 08:36 AM
  4. painting & coloring via cnc?
    By vaneeck1 in forum Printing, Scanners, Vinyl cutting and Plotters
    Replies: 1
    Last Post: 03-25-2006, 07:33 PM
  5. Syntax question
    By doug6949 in forum Mastercam
    Replies: 2
    Last Post: 12-13-2004, 08:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •