Open core-ai-bot opened 3 years ago
Comment by iwehrman Tuesday Jul 16, 2013 at 20:45 GMT
In the original code for untitled documents the default extension was .txt
. This was done to ensure that untitled documents would be created in text mode, and as a consequence to avoid having to either update the JS hinter to cope with these weird documents or to disable code that reaches into the JS hinter on their behalf. This still seems like the right thing to do. AFAIK, it was only changed to .js
for consistency with New File In Project. (I don't really think it makes much sense for any new documents or files to have a .js
extension by default, but that's another story.)
I can certainly disable QuickEdit on untitled JavaScript files, but now I notice that it also needs to be disabled on Jump To Definition and possibly elsewhere. Unfortunately I haven't yet found a clean entry point from which to disable everything at once related to JS hinting for untitled documents. So, without further research, I'm looking at adding at least two more hacky tests in fairly arbitrary parts of the code to short circuit these commands.
My preference is still clearly for untitled documents to not be in JavaScript mode. Any thoughts on this? Will you let me change both untitled documents and new files to have a .txt
extension and back out the existing incomplete hacks to turn off JS hinting in untitled documents?
CC@
peterflynn
Issue by gruehle Tuesday Jul 16, 2013 at 20:18 GMT Originally opened as https://github.com/adobe/brackets/issues/4481
Steps to repro
getCurrentDocument
) and press Cmd-E.Results Inline editor is not opened, and an error is output to the console: