Wrap Comments and Text to Column Width in IntelliJ Editors

One of the small annoyances I found after switching to IntelliJ text editors recently was that the editor won’t reformat selected text to your chosen column width. Annoying, for Vim and Emacs users!

I corrected this by writing my first IntelliJ plugin: Wrap to Column, which is a port of a different plugin I wrote for the same feature in Sublime Text 2.

My “Wrap to column” command wraps selected text or the current line to the column width you’ve configured for the project. The goal is to match the functionality of Vim’s “reformat lines” (gq) command and “fill paragraph” in Emacs.

Just so you know, there is a “fill paragraph” command in IntelliJ — something they added in recent months — but I’ve not been able to get it to do anything but merge all selected text into a single line that is longer than my column width setting. After filing bug reports and sending emails, I gave up and wrote the feature myself, since I’d already done so once before.

If you end up using it, drop me a line or comment on the plugin page if it’s working for you. I could use more testers!

Build an In-Memory Proximity Search Web Service with Python, SciPy and Heroku

In this post I’m going to look at a concrete example of building an in-memory proximity (aka, nearest neighbor) search web service using Python, SciPy and Heroku. Later we can speculate on use cases for this approach as opposed to a geo-aware database. Define Our Terms So, let’s define our terms: In-memory: The web service [...]

Continue reading...

Revisiting Umberto Eco’s Future of the Book

In 2003 Umberto Eco gave a talk at the opening of the Bibliotheca Alexandrina titled, “Vegetal and mineral memory: The future of books” that is interesting to read again now, nine years later. His goal in the talk was to break apart the fear people had about “the future of books.” He split this fear [...]

Continue reading...

Using IPython Notebook with Django

IPython has a relatively new featured called the “Notebook,” which improves on the traditional terminal shell in many ways. Notebook launches a web-based shell to an IPython session that has some very, very handy features, like the ability to save, edit and delete “notebooks” of code that are each comprised of organized cells of Python, [...]

Continue reading...

Set an ImageField path in Django manually

Apparently this is a confusing topic. Let’s say you have a Django model with an ImageField and some existing media files, and you’d like to connect the files to the ImageField. This is relatively painless and doesn’t require you to use the save() method on the ImageField. If you only want to set an ImageField [...]

Continue reading...