[SVN] Release candidate
Allan Odgaard
mailinglist at textmate.org
Mon Dec 12 10:59:05 UTC 2011
**PLEASE DO NOT REPUBLISH THIS INFORMATION!**
We’re planning to release the alpha preview tomorrow.
Since there are a zillion things which can go wrong, I’m letting you
be the first batch of testers before inviting the masses.
You can download the preview here:
<http://updates.textmate.org/Application/TextMate_r8926.tbz>
We’re not asking for general feedback just “it didn’t launch at
all” and stuff like that which could possibly cause a hailstorm of
emails if this was posted to the blog.
A few caveats:
* This release will submit non-anonymous crash reports — you can
disable in Preferences (but we strongly encourage you to leave it
enabled).
* Several items in Preferences have no effect, one of them is “keep
bundles updated” (this is always enabled).
* Bundle editor is _very_ provisional and not how the final system will
work.
* Many settings you toggle via the menus are not preserved, some are
even lost when you switch tab. Generally though these things can be set
via `.tm_properties`.
Superficial release notes follows.
The linked articles will follow later.
* Multiple carets / discontinuous selection
The easiest way to get multiple carets is by doing a left or right
movement command (like arrow left/right) with a column selection. You
can also ⌘-click to place new carets or use _Edit → Find All_
(⌥⌘F). [Thorough post about the new possibilities
here][multiple_carets].
* Snippets
New syntax for pop-up menus: `${1|first,second,…,last|}`. In a Git
commit message try `fixup⇥` to get a pop-up of your last 10 commit
messages (for a `fixup!`-commit) or between `@interface`…`@end` in
Objective-C you can try `prop⇥` to get a `@property`-declaration with
pop-up for its access type.
Snippets can be nested, a frequent request but it does cause a few
false firings of snippets which we haven’t yet found a good solution
for.
* Movement / Selection
Text is classified into units which you can change with the
`characterClass` (scope) setting. For example a C string with `%1$ld\n`
has only two units (`%1$ld` and `\n`) for the purpose of selection
(_Select → Word_ or double click), word movement (⌥⇠/⌥⇢), and
other functions that rely on character types.
TextMate 1.x has _Select → Block_ (⇧⌘B) where a block is found
using scope-defined paired characters such as braces, brackets, etc. In
2.0 you can move to begin/end of such block with ⌃⇡/⌃⇣ and the
paired characters can be strings (planned to be patterns).
Whenever you select a unit (like anything in the _Edit → Select_
submenu) the selection is “unanchored”, meaning it can be extended
to either the left or right side. A minor thing but I find it
surprisingly useful, e.g. to select `foo(bar‸)` we first select the
parenthesis with ⇧⌘B and then extend left by one unit with
⌥⇧⇠, previously you couldn’t be sure the last step would extend
or simply move the selection end point.
* Themes
There now is the ability to change font and font size per scope. So
you’ll (by default) see that headings in markup are shown with a
larger (non-fixed width) font.
You can also change soft wrap on a per-line basis, so soft wrap is e.g.
disabled (by default) for diffs embedded in Git commit messages, raw
(code) blocks embedded in markup, and enabled for line comments in
source.
Soft wrap can be indented. This is also based on scoped settings so
list items in markup are indented differently than line comments in
source.
[More info in this post][layout].
* Foldings
Foldings have been taken out of grammars and are now per-line (via
scoped settings). In addition there are two new patterns to allow
folding indented blocks. See the [layout post][layout] for details.
* Indent
TextMate is more aggressive about doing indent corrections. This works
great when the patterns are well-calibrated but can be disabled with the
`disableIndentCorrections` scope-setting. This setting also change the
behavior of re-indented paste to a heuristic that works much better with
Python (for which indent corrections are disabled by default).
* Folder specific settings
Variables and some settings can be set on a folder / file-type basis.
[More info in this post][tm_properties].
* Project drawer
The project drawer has been replaced with a file browser sidebar. This
file browser has most Finder functions (labels, duplicate, etc.) and
does SCM-badging, presently only for Subversion, Git, and Mercurial. In
addition it has support for running commands (although somewhat
proof-of-concept ATM) and can also do custom data sources, the API is
not yet public but an SCM Status data source is included (the smart
folder icon) which show SCM status for the current project. This data
source works great together with the various SCM bundles.
* Buffer completion
This has been improved to work with the existing word suffix (in
addition to prefix), use the new character class system, etc. [More
details in this article][completion].
* Shell invocation
_Preferences → Terminal_ allows you to install `mate` which has a few
new options and work when called as `sudo mate`. In addition you’ll
find `rmate` which is a ruby implementation that you can use on a server
over ssh. [See this article for more info][mate_and_rmate].
* Search in project / folder
Revamped the old “Find in Folder” and merged it with the regular
find dialog. It’s now asynchronous, a lot faster, and more flexible.
[See this article for more info][find].
* Format strings
Format strings are ubiquitous in TextMate 2. Even scopes in grammars
are format strings (allowing you to capture document content for use in
scopes) and format strings are more powerful than the 1.x variant. [See
this article for more info][format_strings].
* Scopes
Scopes now contain info beyond document context. For example the
`attr.scm` scopes give info about the current file’s SCM status,
allowing using same key equivalent for different SCM systems.
The `dyn` scopes give info such as “is there a selection” (allowing
to change key bindings only when there is or isn’t a selection), an
example of this is overloading `{` to “wrap selection” (nicely), but
leave the key alone when there is no selection. Another use-case could
be to change tab to shift the text right (indent) only when there is a
selection (common user request that I don’t plan to make native
behavior).
You can also add your own stuff to the scope via the file and folder
specific settings which allows e.g. adding `attr.test` to your unit
tests and overload ⌘R for that scope or have certain snippets only
fire in that scope (e.g. we have a `main⇥` snippet for C which inserts
the venerable main function — makes sense to overload this for (C)
unit tests, which generally would be regular C files).
* Scope selectors
The caret is actually between two scopes, the left and right characters
scope. In 2.0 we finally allow you to explicitly target either side (or
both), making the firing of certain overloads more correct. There are
also a few other new things related to scope selectors, but a lot of it
is still only implemented in the parser, so will delay the thorough
explanation of this.
* Commands
Commands can require other bundles which allow them to reference
support files in the required bundle. They can also declare which shell
commands they need which means better error handling and also having
TextMate try to find the required commands. Failing commands result in
more graceful error dialogs. The output options for a command has been
split into location and format. Commands can run without a document.
* Grammars
Grammars can be injected into existing scopes, for example there are
now grammars for marking URLs, `TODO`, and similar which are injected
into comments and other appropriate places.
Various other things related to parsing which require its own post.
* Semantic classes
Bundle items can now be assigned a semantic class. This allows us to
query for e.g. `action.build || action.run` (for current scope) to find
an appropriate build command (with a run command as fallback). The
advantage of this is manyfold: ability to do tool bars, palettes, and
unified key bindings, for example we have a single _proxy item_ bound to
⌘Y which does a query for `action.scm` finding all the SCM actions
relevant for the current scope (remember scope now include SCM info,
making it pick the proper SCM system).
Proxy items are a new construct but still at the proof-of-concept
level, so more about this later.
TextMate itself will also do queries at various times, for example when
opening a file it queries for import commands, where we include several
to decompile AppleScript, pretty-print binary property lists, and
similar. It also uses this system on save, so by default we now make new
scripts with a shebang executable after save.
Like proxy items, this system is in its infancy.
* Managed bundles
When you open a file type for which you have no bundle, you’ll be
asked to install one (if TextMate knows of one). Bundles are
automatically kept up to date and you can see installed bundles (and
install more) in _Preferences → Bundles_.
* Session restore
TextMate restores the full session which includes unsaved changes
incase of abnormal exit.
More information about the textmate-dev
mailing list