Tag Archives: editor

How to add string interpolation highlighting for Sublime

To add general string interpolation highlighting for Sublime Text 2, you need to edit your .tmTheme file. It can be found in your SublimeText 2, go to Preferences, then Browse Packages. This will open up your finder or Windows Explorer. Look for the folder “Color Scheme – Default”, you should be able to find themes like Monokai and others inside.

In order to add the syntax highlight for CoffeeScript #{} in strings, for example:

c.url("#{vhaAppAddress}saaa", done)

Open up your .tmTheme file and add the following lines:

        <dict>
            <key>name</key>
            <string>Embedded Source</string>
            <key>scope</key>
            <string>string source, text source</string>
            <key>settings</key>
            <dict>
                <key>fontStyle</key>
                <string></string>
                <key>foreground</key>
                <string>#9bca3c</string>
                <key>background</key>
                <string>#444</string>
            </dict>
        </dict>

You can change the colors of background and foreground to your liking too. Hope you’ll find this useful!

How to add Ruby string interpolation highlighting for Sublime

To add Ruby string interpolation highlighting for Sublime Text 2, you need to edit your .tmTheme file. It can be found in your SublimeText 2, go to Preferences, then Browse Packages. This will open up your finder or Windows Explorer. Look for the folder “Color Scheme – Default”, you should be able to find themes like Monokai and others inside.

In order to add the syntax highlight for Ruby’s ${} in strings, for example:

puts "Working in #{pwd}"

Open up your .tmTheme file and add the following lines:

        <dict>
            <key>name</key>
            <string>Embedded Ruby Punctuation</string>
            <key>scope</key>
            <string>string punctuation.section.embedded.ruby</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#75715E</string>
                <key>background</key>
                <string>#444444</string>
            </dict>
        </dict>
        <dict>
            <key>name</key>
            <string>Embedded Ruby Source</string>
            <key>scope</key>
            <string>string source.ruby.embedded.source</string>
            <key>settings</key>
            <dict>
                <key>foreground</key>
                <string>#FFFBF7</string>
                <key>background</key>
                <string>#444444</string>
            </dict>
        </dict>

You can change the colors of background and foreground to your liking too. Hope you’ll find this useful!

E Text Editor has been opensourced, Linux version coming

E Text Editor has been opensourced. Linux version is expected too as E Text Editor blog reveals:

Releasing the Source

As of today, the source of the e text editor is being released. This is the first step in the transformation into an Open Company.

Note that this is not just handing the development over to the community. I am still, and will continue to be, the main developer. Development of the editor will continue and it will still be fully supported in the future.

What the release means is that you can never risk ending up with a product that is totally abandoned, that many more eyes will be there to find and remove bugs, that companies and individuals can themselves add features only they need for inhouse use and that the community can help speed up the development of e and hopefully free me up to work on the more innovative features (of which there are many in the planning stages).

Linux version

There has been many questions about whether the release of the source would make it possible to build a Linux version. The answer is yes. The source does build under Linux, it just needs a Linux version of the ecore library which will be released shortly.(Source: E Text Editor)

I tried a trial of E Text Editor before but it was a little buggy back then. This news do, however, made me smile.

The 10 essential vi editor commands

This is just so annoying. I had to use the vi editor and it’s hard for me. I’ve gotten use to the mouse and backspaces and enter and all the Word shortcuts. To downgrade to this vi editor sucks.

Ten vi editor commands

  1. To insert – a (INS works too it seems)
  2. To insert on new line below the cursor – o
  3. To replace the one character under your cursor – r
  4. Left Down Up RIght – h j k l (Arrow keys works too it seems)
  5. Undo – u
  6. Delete the line – dd
  7. Delete the character on cursor – x
  8. To get out of the Editing mode – ESC
  9. To quit the bloody editor without saving – :q!
  10. To save and quit – :wq

This is by no way the complete list, the complete list have hundreds of commands that only a true geek who reaches the stage of nirvana can remember.

This post is more for my personal note. I encounter editing when using the visudo command.