This provided value during early development, but has been unused for years, and it would generate too much noise if converted to os_log.
So better to just remove it all and add os_log statements as needed.
This was required when we linked each framework as its own thing, which we do not do anymore, and if we do go back to this system, we can simply have symbols public by default.
This does change ranking of the wildcard scope selector, as incase of a wildcard match, the old code did not change the rank, so it would be up the caller, which was 1 for bundle item matching but 0 for settings and theme matching.
This is done by setting `atomicSave` to one of the following values:
always Always use atomic saving (default)
externalVolumes Use for non-internal volumes (e.g. USB drives)
remoteVolumes Use for non-local volumes (e.g. network mounts)
never Never use atomic saving
legacy Always enabled, but do not use NSFileManager
Setting it to `externalVolumes` also includes `remoteVolumes`.
For example we have targeted defaults to set tab settings for Ruby, Python, and Makefiles. If the user changed the tab size, it would result in a global untargeted setting that would then eclipse the targeted settings because these were “less local”.
This was not an issue prior to 431bba9a2e.
We can have multiple file patterns match the path for which we ask for settings, so the order of sections does matter, as we’ll use the setting from the last section with a match.
The order enforced is based on length though with a leading asterisk subtracted from the length, that way ‘*.txt’ will be placed before ‘CMakeLists.txt’ and ‘*.rb’ will go before ‘*_spec.rb’.
Incase of same length, we use regular string compare which would normally put the wildcard match first, e.g. ‘*.config’ goes before ‘.config’.
That way, if we have a setting for [ templates/** ] and create a new file in the templates folder (via the file browser) these settings will apply.
Previously we used the folder without trailing slash which required making the file pattern something like [ templates{/**,} ].
Settings are now ranked by locality first, and only if multiple settings from the same .tm_properties file apply, we rank them further using the following order (from lowest to highest): untargeted, scoped (ranked by scope selector), and finally file pattern match (glob).
Some targets were including headers from frameworks not specified in their link dependencies. For a clean build this could cause an issue because the header was not available at the time of building the target.
The updated link dependencies are also based on what a target’s tests require. Ideally tests would have separate link dependencies, but as we don’t want to maintain this manually, this will have to wait until the build system automatically handles link dependencies.
Currently the commit command uses constants from the CommitWindow framework but should actually not be linked with it. However, the optimizer will strip dead code, so it should not result in much if any difference in the resulting binary and does solve a build dependency issue.
The section name is now also the literal section name rather than to_s called on the parsed scope selector or glob (which wouldn’t necessarily give the source value).
This makes it easier to enable auto-saving when TextMate loses focus and unlike using a command for this, files that cannot be saved will be silently skipped (as the user is leaving TextMate, so we should not throw up dialogs).
A file setting like “src/*.cc” is arguably more specific (and thus more local) than targeting the scope “source.c++”, so it makes sense that the file settings rank higher than scope settings.
Some users also find it natural to target file extensions over scopes, but as TM will store some learned settings with a scope selector, it would previously lead to confusion, when a user was unable to e.g. change tab size for “*.php” (because TM had a learned setting for “source.php”).
This setting allows changing which invisibles are shown and what glyph
is used for them.
Invisibles are '\t', '\n', and ' ', to turn one off, add ~[\t \n] to
the settings string. To set the glyph used for the invisible, add [\t
\n][glyph_to_use].
We keep indirect references to cache lookups (for the duration of the function that use the cache) so we can only do cleanup at the start or end of the function which use the cache.
This applies both to the action method and the settings key, the latter is now relatedFilePath to indicate that it’s a full absolute path (neither relative or a glob pattern).
The user can now set ‘counterpart’ in .tm_properties to the absolute path of what should be used for ⌥⌘↑. If the file does not exist (on disk or as an open tab) then TextMate will fallback to searching the current folder for a file with same name.
To switch between go source and go test files one could add the following:
[ *.go ]
counterpart = "${TM_FILEPATH/(_test)?\.go$/${1:?:_test}.go/}"
Here the regular expression transformation will remove ‘_test’ from the file name if it exists, otherwise add it.
One could also do multiple settings like:
[ *.go ]
counterpart = "${TM_FILEPATH/(?=\.go$)/_test/}"
[ *_test.go ]
counterpart = "${TM_FILEPATH/_test(?=\.go$)//}"
Here ‘*.go’ files get the ‘_test’ added to their name, though files matched by the ‘*_test.go’ glob will instead have it removed.
Set this to ‘true’ if you want the file chooser (⌘T) to follow symbolic links.
The reason for making it a ‘.tm_properties’ setting is only because I am not yet sure how to best integrate this into the UI. The find dialog has an identical UI option which is global option — it would make sense to coalesce these two options, and while doing that, make the find dialog’s version a project/path setting rather than have it be global.
Closes#984.