marijnh/CodeMirror — pull request #2379 by lazywei (2014-03-17 13:59:34+00:00)
Title: [vim] Fix text object bugs

This PR is intended to fix the bugs mentioned in #2226.
I haven't finished my work yet, but I want to start the discussion.

Here is the TODOs:
- [ ] doing `da{[(` where no closing brace exists moves the cursor right 1 character. It should stay still
- [ ] doing `da{` while the cursor is on the inner `{` in the demo deletes the outer block, when it should delete the inner block. Off by one error somewhere?
- [ ] doing `da[` while the cursor is on `{` or `(` deletes the `{}` or `()` block, when it shouldn't do anything
- [ ] doing `da[` while on the cursor is on `}` or `)` deletes the inner `{}` or `()` block. Doing `di[` seems to delete the outer

Here is the further TODOs:
- [ ] Add test for `findMatchedSymbol`, `textObjectManipulation`
- [ ] refactor `findMatchedSymbol`, there is some redundant logic, but I'm not sure.
- [ ] refactor `textObjectManipulation`

This is my very first contribution to CodeMirror. So please let me know if I violate any code style or convention. Thanks.