[TxMt] Re: Projects are gone in TM2?
Allan Odgaard
mailinglist at textmate.org
Thu Dec 15 10:47:38 UTC 2011
On 15 Dec 2011, at 06:48, Trevor Harmon wrote:
> […] Are you saying it's possible to nest .tm_properties? That is, put a "global" .tm_properties at the top level of the project and another one in a subdirectory that overrides the top-level properties. This could be useful if, for example, one of the 30 frameworks requires a custom build command.
Exactly, or one of the frameworks is MASPreferences¹ which uses another coding style than me, so I have:
# vendor/MASPreferences/.tm_properties
tabSize = 4
softTabs = true
TM_C_POINTER = " *"
The “root” .tm_properties though can also target subsets, for example I have:
[ "tests/t_*" ]
scopeAttributes = 'attr.test.cxxtest'
TM_MAKE_TARGET = '${TM_FILEPATH/^.*?([^\/]*)\/tests\/.*$/$1/}/test'
[ "tests/t_*.mm" ]
GUI_TESTS = '${TM_FILENAME/^t_(.*)\.mm$/$1/}'
So when I am in a test file (e.g. Framework/buffer/tests/t_buffer.cc) I have a different make goal and I have ‘attr.test.cxxtest’ in my scope so I get test assertions instead of regular debug assertions on A⇥.
Furthermore when I’m in say Frameworks/OakAppKit/tests/t_tabbar.mm I have the GUI_TESTS variable set to ‘tabbar’: normally GUI tests are skipped by the make process (because they open windows and are often interactive), but not when I’m actually in the test file such GUI test.
¹ https://github.com/shpakovski/MASPreferences
More information about the textmate
mailing list