Posts tagged with 'textmate':

Announcing Coloration, editor color scheme converter


Without further ado I'm introducing Coloration - editor/IDE color scheme converter. It is an evolution of tm2jed tool and at the moment it can convert Textmate color themes (in XML plist format) to Vim, JEdit and Kate/KWrite/KDevelop color schemes. So if you are Textmate->Vim convert or you just envy Textmate users for their good looking, dark themes now you have no excuse to not try out Coloration.

Here's how Vim with Sunburst theme looks like:

Vim with Sunburst color scheme

If you want to give Coloration a try you have two options. Either you can use online version at coloration.sickill.net or you can install ruby gem coloration:

gem install coloration

It will give you tm2vim, tm2jedit and tm2katepart commands. Note it requires ruby 1.9.

Let me know if you find it useful. Source code is available at github.com/sickill/coloration.

Enjoy!

View Comments

Open File Fast - Netbeans plugin for quick opening project files


Textmate has nice feature which is a real timesaver. It’s quick open file dialog. You can type only several characters of filename you are searching for and you get list of all files matching your pattern. When you are looking for FooBar.java you can type fbj and you will find it. It really helps navigating through the project (especially bigger ones).

So… let me introduce my new Netbeans plugin: Open File Fast™. It was inspired by mentioned Textmate’s functionality but has a lot more features. Netbeans already has some Go-To-File dialog but it isn’t too flexible and it requires you to type exact part of file’s name.

Here are the key features of Open File Fast:

  • quick finding and opening any file from selected project
  • two matching modes:
    • smart (like in Textmate, matching filenames must contain all typed characters, they can be separated by other characters)
    • exact (like Netbeans’ Go-To-File, matching filenames must contain exact phrase)
  • matching from start of filename or anywhere in filename
  • support for * wildcard in exact mode
  • changing minimum entered pattern length needed for searching (default: 3)
  • changing delay (time from last keystroke) after which searching starts (default: 300ms)
  • optional cleaning of search input field when O-F-F window opens
  • hiding files you don’t work on (matching specified regular expresions) from results
  • moving less important files (matching specified regular expresions) to the bottom of results list
  • results sorted by:
    • file popularity (files opened frequently at the top of list)
    • match accuracy (distance between characters from search phrase in matched filenames)
  • opening multiple files at once (selected with ctrl/shift + mouse)

Let’s see how it look in action. Invoke O-F-F from Netbeans’ Navigate menu (I recommend creating a keyboard shortcut for it in Tools/Options/Keymap/Project, I like ctrl+T). For example when you type user you will get following results:

But what if you want to open users_helper.rb file? Just type ush and you will find it!

If you know that something you need is in some javascript file you can show all js files by entering *.js.

When you want to narrow down your search to specific directory just type some parts of directories’ names separated by slashes. For example when looking for files in directory app/models (under project root) type a/m/.

Matching algorithm by default starts searching for pattern at the start of filename, but if you want to search for pattern anywhere in filename (like in Textmate) you can change it in options. Here we are searching for proj and the results list contains also filenames not starting with proj.

Open File Fast can be set up to your own preferences and to match your own workflow. You can configure it under Open File Fast tab in Netbeans’ Miscellaneous options:

Grab it here: off-netbeans-0.9.3.nbm. If you want to help or just look into sources they’re on github .
This is the first public version of this plugin so it could have some bugs, however we’ve been using it for a while now with my workmates and nothing exploded yet :)

Update: for most recent version of plugin go to OFF project page .

View Comments

Textmate to JEdit Colour Theme Converter


JEdit was my favourite code editor for a long time and I was polishing its configuration constantly to make it perfect. It has lots of great plugins which make it rather feature complete for me. As I’m working with the code 8+ hours a day I also need some nice colour scheme for my code. EditorScheme plugin adds support for changing schemes in JEdit and it’s bundled with several schemes. Unfortunately I couldn’t find a scheme which suits me…

Fortunately I saw several nice themes for Textmate which looked really sexy ;) Converting themes by hand was too much hassle so I’ve created tm2jed to convert them automatically. It’s written in ruby and all it does is reading given Textmate theme and outputing it as JEdit’s theme.

Following screenshots show how JEdit look with Twilight, Glow, Plastic Code Wrap and Glitter Bomb themes:

jedit with twilight themejedit with glow themejedit with plastic-code-wrap themejedit with glitter-bomb theme

You can get tm2jed here (as zip archive). Alternatively you can get it from github.

Once you have it, run:

ruby tm2jed.rb some_textmate_theme.tmTheme

It will save converted theme as some_textmate_theme.jedit-scheme which you can put in schemes directory of your jedit settings folder. Then choose it in EditorScheme plugin inside JEdit and you have new shiny colour scheme!

Conversion is not perfect as JEdit and Textmate implement theming in different way but for most cases it works fine.

I’ve converted 16 Textmate themes so if you don’t want to mess with tm2jed you can grab them here in one zip file. It contains Cool Glow, Monokai, Starlight, Texari, idleFingers, Glitter Bomb, Plastic Code Wrap, Succulent, Twilight, Monoindustrial, Glow, RubyBlue, Sunburst, Vibrant Ink, IR_Black, Spectacular, Tango and Choco themes.

View Comments