Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At the moment, it just gracefully disables itself so the movement commands revert to calling the corresponding Tuareg and Merlin operations. This is mainly because I currently rely on the vanilla OCaml parser to build the AST which doesn't handle recovery from syntax errors.

In the future I plan to move over to the Merlin parser, which has partial support for syntactically invalid buffers (I believe it wraps invalid regions with another syntactic construct), so it should still be possible to move around in other parts of the buffer.

As an aside, as I mentioned on the OCaml forum, I haven’t found this to be a major issue as I find that most of the time when I’m moving around (i.e not inserting text), the code is usually syntactically correct - I’ve also bound M-RET to insert a type hole (??) to easily allow movement even when I haven’t completed a function definition, and overall this leads to quite a natural editing experience.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: