[serve: true]: /

Everyday Problems: Snippet Manager and Documentation Browser for different Languages

Every day i work with Xcode it's a pain to have the Organizer showing me the Documentation as the front most window and i need to switch back to Xcode manually because i cannot Alt-Tab between the Xcode Windows. AppCode, my IDE for Objective-C makes it a little better, but do not integrate the original Documentation from Apple. And sometimes its nice to have the whole cake of informations, not only one piece. With my prefered IDE, IntelliJ, for my other languages i have a better integration but sometime i want to have the documentation still open and like to switch back and forth when i learn new stuff.

Snippets was the other Problem. Storing Snippets between different IDEs, TextEditors of even the Shell is not the nicest thing.


Dash, looking Promising

Today i stumpbled upon a new piece of software that looks really promising. Dash. It combines a Snippet Manager and a Documentation Browser with a Hotkey and makes it easy to lookup something in the Documentation of look for a Snippet in your Repository. Most of the Snippet Manager

<!-- more -->

Snippet Manager

When your are working in a text and type on of your abrevations a popup upen up and you are able to fill in all placeholders. Afterwards the text is copied to your current cursor location.

Here are the features from the homepage:

  • Collect snippets of code that you reuse often.
  • Snippet detection. Dash will suggest snippets based on what you copy and paste.
  • Sync by saving your library in Dropbox.
  • Over 80 syntaxes for code highlighting.
  • Variable Placeholders can be edited before pasting.
  • Abbreviations are expanded wherever you type them.

Special Variables for your Snippets

If you include special variables in your Snippets you can insert your clipboard or other. With the Clipboard feature you can generate Snippets that surround some code.

For example, this snippet would enclose your code from the clipboard in an if condition and you you can edit the condition before it expanded to your current cursor position in your editor and position the cursor after your code.

{% codeblock Snippet for Objective-C lang:objc %} if (condition) {

@clipboard
@cursor

} {% endcodeblock %}

Here is the list of all special variables from the Homepage:

  • @clipboard expands into the contents of the clipboard.
  • @cursor repositions the cursor after expansion.
  • @date expands into the current date.
  • @time expands into the current time.

Scanning for Snippets

Dash can scan your Clipboard for often copied statements and suggest putting these in a snippet. I haven't tried this features but it sounds interesting to me.

Documentation Browser

The Documentation works like a breeze and supports multiple docsets for different Languages and Plattforms. Dash comes with the support for: ActionScript, Android, C++, Cappuccino, Cocos2D, Corona, CSS, Django, HTML, Java, JavaScript, jQuery, Lua, MySQL, Man Pages, Perl, PHP, Python, Ruby, Ruby on Rails, SQLite, Unity 3D, XSLT, XUL.

But it supports including own Docsets as feeds. You can find the documentation to include your own docsets.

Pro's and Con's

Dash is at the moment in the beta phase and it will be very interesting to see it mature. At the moment it looks stable and promising. But at the end the price will be interesting and can be a show stopper.

The HUD is a little bit to heavy. Borders and Font could be a little thiner. When you switch to the HUD Display in the preferences a Arrow appear that points you to the Tray Symbol. THAT thing could be a lot smaller ! If you miss it you need more than new glasses.

At the end...

I tested some Snippet Managers and i was not satisfied with most of them. Dash makes a really nice combination of a Snippet Manager and Documentation Browser. So, it will be for the next time my little helper in the background to support my daily coding.