Allow customizing what is used for ‘Go to File Counterpart’ (⌥⌘↑)

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.
If no counterpart is found, create tab with custom path

This way, if we specify that ‘*.go’ has a counterpart of ‘*_test.go’ but no test file exist (and no other files with same base name) then ⌥⌘↑ will create a new tab using the test file path as default save path.
Remove obsolete help text for mate -n
File browser icon bindings were semi-case-sensitive

We compared the lowercased extension or file name with the case-preserved entry in the bindings.plist file, meaning e.g. ‘Makefile’ never got the intended icon.
Add new file types

This includes a new “braces” icon for use in the file browser, presently only used by ‘.go’ files.
Move some Go menu items to Navigate menu

The Go to Symbol and Line are now in the Navigate menu, which means everything in the Go menu is about selecting a file or folder (for the file browser location).

The Navigate menu is about navigating around in the current file.

Also change menu item title “Go to Counterpart…” → “Go to Related File”
Change “counterpart” to “related file”

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).
Add “related file” settings for *.go (test) files

With this setting ⌥⌘↑ will switch between test and non-test *.go files.
Fix “unused variable” compiler warning
Use ruby 1.8 in the shebang for new commands

Using the ruby found via PATH would require the command to be tested with ruby 1.8, 1.9, 2.0 and possibly alternative ruby implementations (rubinus, jruby, …) so best to be explicit about which version the command is written for.
Improve readability of brace movement tests
Improve code to find “paired character ranges”

The algorithm now handle overlapping character ranges like: ‘(f{o)o}’ and unpaired characters surrounded by character pairs.

This is for selecting (⇧⌘B) and moving to the begin or end of the range (⌃↓/⌃↑).
Allow setting a tab as “sticky”

Presently this can only be done by right-clicking the tab and selecting the “Sticky” option — if a tab is sticky then it will not be closed when executing any of the batch close actions (Close All Tabs, Close Other Tabs, Close Tabs to the Right, and holding option down while opening a file via file browser or file chooser).

Closes #1038.
Add missing semi-colons after assertion
Fix issue with merging delta property lists
Remove unused function: pattern_t::indices_for_group
Use oniguruma’s default character type (OnigUChar)

This introduces a bunch of typecasts but means that less patching is required when updating the library.
Do not set hidden visibility for C sources

This is for oniguruma and ideally we would set this only for the oniguruma target, but then we need special precompiled headers for that target, so this is a practical way to achieve the goal (there are no other C sources in the build tree).
Ensure -include «pch» is the first compiler option

This is incase we want to set ‘-include’ via a FLAGS variable, as that only works when it is listed after a potential precompiled header include.
Add Onigmo submodule