adobe/brackets — pull request #6268 by njx (2013-12-18 23:56:50+00:00)
Title: [DISCUSSION ONLY] First pass at integrating latest CodeMirror for sprint 36

In the latest CM (as of marijnh/CodeMirror@d13582f), the CSS mode has been refactored substantially. The good news is that LESS is now supported by CSS mode, meaning that we can much more easily make basic code hinting work for LESS files (similar to what we've already done for SCSS files). The less good news is that the internals of the mode have changed significantly. In particular:

* There's no longer a `stack` member on the `state` object, but instead a `context` member which seems to fulfill the same role.
* Some of the token types appear to have changed (specifically, `propertyValue` now seems to be `prop`).

This PR contains a quick attempt to make the existing CSS code hinting work properly with the changes to CSS mode. It also hooks up LESS files to the CSS mode (instead of the old LESS mode) and attempts to turn on code hinting in those files.

With these changes, it looks like almost all the existing CSS code hinting unit tests pass, except for one in CSS Context Info. However, I haven't done much manual testing beyond verifying that basic property and value hints seem to work in CSS and LESS files. Also, this was based on only a **very** cursory understanding of the existing CSSUtils code and of the changes to the CM CSS mode, so it's quite likely that we need to do more work and testing to make sure everything is working properly.

@RaymondLim - would you mind taking a look and seeing what you think? I'm wondering if we need to add a story for this (to ensure we get adequate testing, etc.), which might mean pushing it to the next sprint.

Additionally, there were a number of other smaller changes since our last CM merge that are probably worth testing around. From looking at the commit log, these are the areas we'd want to do some sanity testing around:

* Inline editor line hiding (esp at beginning/end of doc) - make fix first
* LESS - using CSS mode now! - include that and test
* XML-mode
* Auto-closing of HTML tags
* Look for gutter issues
* Hit up arrow while selection exists
* Scroll into view
* newline and indent
* electric chars
* CSS mode changes, incl. tokenization (test quick edit, quick open symbol, etc.)
* JS mode - indentation around for / forEach
* Check undo/redo/dirty bit esp. around quick typing

Finally, this PR also contains the small update required by #6204.