adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.25k stars 7.63k forks source link

New Untitled doesn't respect project tab settings #10370

Open cfjedimaster opened 9 years ago

cfjedimaster commented 9 years ago

I've got a project with the following settings: { "sbruchmann.staticpreview.basepath": "/Users/ray/Dropbox/Writing/Cordova book/", "spaceUnits":2, "sortDirectoriesFirst":true, "useTabChar":false }

Basically spaces instead of tabs and size == 2. I did CTRL+N to make a new blank document and it did not pick up on this. Instead it defaults to Tabs and size 4.

When I edited it in the Untitled doc and opened another one, it seemed to remember the right settings though so I couldn't recreate it.

redmunds commented 9 years ago

I'm seeing something similar with New Untitled docs and the wordWrap setting. I have this global preference:

    "language": {
        "unknown": {
            "wordWrap": false
        }
    }

Problem is that trying to toggle on View > Word Wrap does nothing.

peterflynn commented 9 years ago

The issue is probably PreferencesManager not using the project scope because the Untitled documents don't have a well-defined location on disk yet (so they'll just use your Brackets global settings instead). We probably shouldn't pass any path for Untitled documents, so that they default to the current project's scope.