marijnh/CodeMirror2 — pull request #509 by lopuhin (2012-04-25 19:15:52+00:00)
Title: Enchanced vim mode

Hello! Thank you for such a beautiful editor!

I think I improved vim key-bindings: added more commands and fixed some bugs. This is my first pull request, I may be doing something wrong, looking forward to feedback :)

Maybe I should also notify contributors to vim.js, but I don't know how, maybe @misfo @jankeromnes @chris-morgan @maks ?

Changes summary
==============

Bugs fixed
========

$ now goes not till the end of line, but one symbol before it (so e.g. $i works as in vim now)

define per-character key-bindings in a function, instead of a loop (where local variable "m" was bound to the last value in loop - see line 203 in original source - so the prefix-d' and prefix-y' key-bindings were useless)

do not raise js error when mark is not set (for prefix-d' and prefix-y' maps)

Improvements
==========

Added a list of implemented and major not implemented key-bindings at the top

Added commands: de, dd, P, f, t, df, dt, F, T, dF, dT, cf, ct, cF, cT, gg, s, ce, cb, r, D, cc

Style changes
--------------------
Some really long one-liners now leave on separate lines. Added a couple of missing semi-colons.