Adobe Brackets

JavaScript / Contributor

“Open source love”

Contributed a small piece of code, a one-liner I believe, to the Adobe Brackets text editor. Brackets is a solid open source project that gets better with every commit.

Problem

I don't know why it bothered me so much, but the current line highlighting functionality was not working in Adobe Brackets. The developer in me couldn't let this stand. I decided to give it a fixing.

By far probably the simplest commit to an open source project of 2013.

View my merge request →

Extensions for Brackets Contributions

The extensions package manager for Adobe Brackets is a pretty awesome feature. I think any new text editor that comes into existence will have to ship with one, no question.

Themes for Brackets is a repository started by @Jacse. I loved everything about his plug-in, except for one nuisance. To add a new theme you had to go into the JavaScript file and manually update your theme's name into an array. Yeah, no fun right?

Here's the solution I presented to the project to improve the adding new themes functionality.

Checkout my merge request →
**Below is a quick snippet of what I originally submitted.
    
// Pass file names as an array and create the Themes
Themes.getDirFiles = function (themesNameArray) {
    var i,
        len = themesNameArray.length,
        findDefault = themesNameArray.indexOf('default');

    if (findDefault !== -1) {
        themesNameArray = themesNameArray.splice(findDefault, 1).concat(themesNameArray);
    }

    Themes.allThemes = [];

    for (i = 0; i < len; i += 1) {
        Themes.allThemes.push(new Theme(themesNameArray[i]));
    }

    $("body").append('<link id="currentTheme" rel="stylesheet"/>');

    Themes.load(Themes.currentTheme);
};

// Get the theme directory file names without the .css extension
NativeFileSystem.requestNativeFileSystem(moduleThemesDir, function (rootEntry) {
    rootEntry.root.createReader().readEntries(function (entries) {
        var i,
            fetching = [],
            len = entries.length;

        for (i = 0; i < len; i += 1) {
            fetching.push(entries[i].name.replace(".css", ""));
        }

        $.when.apply(module, fetching).done(Themes.getDirFiles(fetching));
    });
});
    
  

Brackets on Github

Recently, I made the switch back to Sublime Text due to work purposes. I do have a soft spot for the simple yet powerful new text editor, Brackets, and would love to make my way back to it soon. If you are a developer, head on over and contribute to the source code now!

View the Brackets project →