Home > free software, gentoo, maemo, mamona, vim > Editing OpenEmbedded and Bitbake files with syntax highlighting at Vim

Editing OpenEmbedded and Bitbake files with syntax highlighting at Vim

Now that I’m currently working with OpenEmbedded at Mamona, I often have to edit and create new ‘bb’ files (the definition and instructions to build packages or define configurations, like ebuilds for Gentoo).

After working with ebuilds to build a few packages, I was really comfortable with the syntax highlighting and new ebuild templates that I have with Vim, but didn’t found anything like that for Bitbake and OpenEmbedded.

First searching for syntax highlighting for Bitbake, I found that Chris Larson already created a Vim syntax file that covered almost everything I need, but was a little bit different from what we have with ebuilds, so I decided to create my own syntax (based on Chris’) and template plugin.

Here’s the code, I just released the version 0.1, it’s quite easy to install, just like any other vim syntax and plugins, just copy the directories at your ~/.vim (sorry emacs users, but this is only for Vim ;-)

I’m probably not covering everything from the OpenEmbedded/Bitbake syntax, but it’s quite good for now. If you see any red text around at your code just email me and I’ll try to fix it (patches are also welcome).

It was quite fun to develop for Vim, it’s not that different from any other language and it has many good help files where you can find every allowed syntax that you can use in your script.

Here are some screenshots from bb files and the template plugin:

* Syntax Highlighting:
vim syntax

* Template for new bb files (just open a new file that ends with ‘.bb’):
vim template
The template plugin will try to find your user name and email by your global git conf.

Thanks Chris for his syntax file and for the gentoo developers, who created the gentoo-syntax package.

About these ads
  1. May 5, 2009 at 2:00 pm | #1

    Why not add:
    set background=dark

    or type “:set background=dark”
    That way it stops trying to use dark purple as a “highlight” on the black background?

  2. May 5, 2009 at 2:00 pm | #2

    Why not add:
    set background=dark
    to your .vimrc
    or type “:set background=dark”
    That way it stops trying to use dark purple as a “highlight” on the black background?

  3. November 6, 2009 at 3:31 pm | #3

    great configuration! very useful!

  4. July 28, 2013 at 7:22 pm | #4

    It’s critical to observe that not absolutely all sex offences are resolved or result in arrest and only a fraction of sex offenses are documented to police. The dependence on steps of recidivism as resembled through established criminal justice program information (i.e., rearrest or reconviction costs) naturally omits offenses that aren’t eliminated through a charge
    (and thus can not be linked to anyone sex offender laws offender)
    or these that are never noted towards the kid safety measures police.
    http://storify.com/sexoffendermap/easy-way-to-get-an-official-sex-offender-map-free For a number of sex offenders news reasons, several
    subjects of sexual invasion are unwilling to conjure the criminal justice approach and
    don’t survey their victimization to the authorities. For these reasons, counting on rearrest and infrapponendoci reconviction data underestimates real reoffense numbers.

  5. addormentamenti
    July 28, 2013 at 7:24 pm | #5

    It’s crucial to note that not all sex crimes are resolved or end in charge and just a fraction of sex offenses are noted to police. The reliability on procedures of recidivism as reflected through recognized criminal justice system data (i.e., rearrest or reconviction rates) certainly omits crimes that aren’t removed through
    a charge (and thereby cannot be linked to anyone sex offender laws culprit) or those
    that are never claimed to-the kid safety measures police.
    http://pinterest.com/pin/450641506434518246/ For-a selection of sex
    offenders news causes, several patients of sexual attack are hesitant to
    produce the criminal justice process and do not survey their victimization to-the authorities.
    Therefore, counting on rearrest and addormentamenti reconviction knowledge underestimates precise reoffense numbers.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: