Your comments

Because that is the standard behavior since Mac OS X Lion.


You can change this behavior in system settings:



The problem happens when you change the syntax definition of an already saved file. This bug will be fixed in the next update.


The workaround is to immediately change the syntax definition after you create a new file and before you enter any characters.

The problem is described here, too: http://stackoverflow.com/questions/3084892/less-js-not-working-in-chrome


It seems to be a security measure in WebKit so that web pages can't load arbitrary local files using XMLHttpRequest.

Here's the code where it fails to load the file:

function xhr(url, type, callback, errback) {

    var xhr = getXMLHttpRequest();

    var async = isFileProtocol ? less.fileAsync : less.async;

    if (typeof(xhr.overrideMimeType) === 'function') {

        xhr.overrideMimeType('text/css');

    }

    xhr.open('GET', url, async);

    xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');

    xhr.send(null);

It fails at "xhr.send(null);" in line 4261 when executed from a file:// url in Safari.