ajaxorg/cloud9 — pull request #964 by mattpardee (2012-02-19 21:03:36+00:00)
Title: Started as a fix for the editor stealing focus turned into

a total refactor of Vim mode. I spotted a lot of problems in the code (both as code and architecture) and needed to fix them in a timely manner - other issues I simply let go in the interest of time.

@janjongboom @mikedeboer

The main issue was Vim mode was detecting a change in the settings model and calling its own toggle() method _every time the model was updated_. This meant that every time a user did anything with the file tree, or changed a setting, or every 5 seconds even, toggle() would be called and the editor would steal focus.

When I started snooping around I discovered a number of other bandaids/semi-fixes/misguided extension practices. This is in no way meant to vent on the extension author, but to validate the reasons behind my changes.