marijnh/CodeMirror — pull request #1452 by lynschinzer (2013-04-14 19:58:56+00:00)
Title: [vim keymap] Add [] motions

Now we've got `[``]` motions.
What's been implemented:
* sections: `[[``]]``[]``][`
* outer parenthesis: `[(``])`
* outer braces: `[{``]}`
* comment blocks: `[*``]*``[/``]/`
* #if #else #endif: `[#``]#`

What's not fully implemented:
* methods: `[m``]m``[M``]M`
This one is quite tricky, I couldn't manage to do it right. In the original Vim implementation, the cursor only walks on level 1 and 2 and never jumps in deeper levels.

class {1
function {2
for {3
if {4

}4
}3
}2
}1

But in my implementation, it doesn't check the code block levels in context and therefore allows the cursor to jump in deeper levels. For me, to implement it to the extend that rivals the original will require extreme concentration on coding which is not feasible at the moment. : (

In addition, I've fixed one bug within `%` on the fly.