Tuesday, October 25, 2011

ACE editor for scripts editing in SUSE Studio

Ajax.org Cloud9 Editor (ACE) is a standalone code editor written in JavaScript. It is written for Cloud9 IDE and is used in a number of other projects, including GitHub.

Over here, at SUSE Studio, we integrated ACE editor into our scripts editing section, which allow you to edit boot, build scripts and AutoYaST configuration XML. 

Key Features
Here are some key features of ACE that are integrated into SUSE Studio:

Syntax highlighting: Provides syntax highlighting for Bash and XML scripts. This syntax highlighting is similar to IDEs and you should be familiar to it. This allows easy debugging and spotting of careless typos.

Highlighted lines: When navigating through the code with the cursor, the entire line will be highlighted for easy viewing.

Tab indentation: You can do tab indentation easily and naturally just by pressing Tab on your keyboard, without having to worry about losing focus of the textarea.

Ctrl-S Saving: Save your data as often as possible. Use keyboard shortcut to save, by pressing Ctrl-S.

Quick Comparison
Here is a quick visual comparison with/without ACE editor:

Without ACE editor

With ACE editor























See it in action
Here's how it works:

1. Create a new appliance or edit an existing appliance:
















2. Navigating to Configuration - Scripts:



3. In this page, you will be able to edit build, boot scripts and the AutoYaST configuration XML, with the ACE editor. Enjoy!

As always, do let us know if you find any bugs or have any questions.

Contribution
As ACE editor does not originally support Bash scripts, we forked the original source for ACE editor and included syntax highlighting for Bash. To benefit all, we submitted a pull request back to the original source and is pending approval.

We hope you enjoy it as much as we do!

1 comment:

  1. Points for contributing the bash script support back to the ACE devs!

    ReplyDelete

 
© 2013 SUSE