Advertisement
Guest User

TextMate 2.0

a guest
Dec 12th, 2011
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.78 KB | None | 0 0
  1. TextMate_r8926.tbz > http://api.cld.me/CZdZ/download/TextMate_r8926.tbz
  2.  
  3.  
  4.  
  5.  
  6.  
  7. **PLEASE DO NOT REPUBLISH THIS INFORMATION!**
  8.  
  9. We’re planning to release the alpha preview tomorrow.
  10.  
  11. Since there are a zillion things which can go wrong, I’m letting you
  12. be the first batch of testers before inviting the masses.
  13.  
  14. You can download the preview here:
  15. <http://updates.textmate.org/Application/TextMate_r8926.tbz>
  16.  
  17. We’re not asking for general feedback just “it didn’t launch at
  18. all” and stuff like that which could possibly cause a hailstorm of
  19. emails if this was posted to the blog.
  20.  
  21. A few caveats:
  22.  
  23. * This release will submit non-anonymous crash reports — you can
  24. disable in Preferences (but we strongly encourage you to leave it
  25. enabled).
  26. * Several items in Preferences have no effect, one of them is “keep
  27. bundles updated” (this is always enabled).
  28. * Bundle editor is _very_ provisional and not how the final system will
  29. work.
  30. * Many settings you toggle via the menus are not preserved, some are
  31. even lost when you switch tab. Generally though these things can be set
  32. via `.tm_properties`.
  33.  
  34. Superficial release notes follows.
  35.  
  36. The linked articles will follow later.
  37.  
  38. * Multiple carets / discontinuous selection
  39.  
  40. The easiest way to get multiple carets is by doing a left or right
  41. movement command (like arrow left/right) with a column selection. You
  42. can also ⌘-click to place new carets or use _Edit → Find All_
  43. (⌥⌘F). [Thorough post about the new possibilities
  44. here][multiple_carets].
  45.  
  46. * Snippets
  47.  
  48. New syntax for pop-up menus: `${1|first,second,…,last|}`. In a Git
  49. commit message try `fixup⇥` to get a pop-up of your last 10 commit
  50. messages (for a `fixup!`-commit) or between `@interface`…`@end` in
  51. Objective-C you can try `prop⇥` to get a `@property`-declaration with
  52. pop-up for its access type.
  53.  
  54. Snippets can be nested, a frequent request but it does cause a few
  55. false firings of snippets which we haven’t yet found a good solution
  56. for.
  57.  
  58. * Movement / Selection
  59.  
  60. Text is classified into units which you can change with the
  61. `characterClass` (scope) setting. For example a C string with `%1$ld\n`
  62. has only two units (`%1$ld` and `\n`) for the purpose of selection
  63. (_Select → Word_ or double click), word movement (⌥⇠/⌥⇢), and
  64. other functions that rely on character types.
  65.  
  66. TextMate 1.x has _Select → Block_ (⇧⌘B) where a block is found
  67. using scope-defined paired characters such as braces, brackets, etc. In
  68. 2.0 you can move to begin/end of such block with ⌃⇡/⌃⇣ and the
  69. paired characters can be strings (planned to be patterns).
  70.  
  71. Whenever you select a unit (like anything in the _Edit → Select_
  72. submenu) the selection is “unanchored”, meaning it can be extended
  73. to either the left or right side. A minor thing but I find it
  74. surprisingly useful, e.g. to select `foo(bar‸)` we first select the
  75. parenthesis with ⇧⌘B and then extend left by one unit with
  76. ⌥⇧⇠, previously you couldn’t be sure the last step would extend
  77. or simply move the selection end point.
  78.  
  79. * Themes
  80.  
  81. There now is the ability to change font and font size per scope. So
  82. you’ll (by default) see that headings in markup are shown with a
  83. larger (non-fixed width) font.
  84.  
  85. You can also change soft wrap on a per-line basis, so soft wrap is e.g.
  86. disabled (by default) for diffs embedded in Git commit messages, raw
  87. (code) blocks embedded in markup, and enabled for line comments in
  88. source.
  89.  
  90. Soft wrap can be indented. This is also based on scoped settings so
  91. list items in markup are indented differently than line comments in
  92. source.
  93.  
  94. [More info in this post][layout].
  95.  
  96. * Foldings
  97.  
  98. Foldings have been taken out of grammars and are now per-line (via
  99. scoped settings). In addition there are two new patterns to allow
  100. folding indented blocks. See the [layout post][layout] for details.
  101.  
  102. * Indent
  103.  
  104. TextMate is more aggressive about doing indent corrections. This works
  105. great when the patterns are well-calibrated but can be disabled with the
  106. `disableIndentCorrections` scope-setting. This setting also change the
  107. behavior of re-indented paste to a heuristic that works much better with
  108. Python (for which indent corrections are disabled by default).
  109.  
  110. * Folder specific settings
  111.  
  112. Variables and some settings can be set on a folder / file-type basis.
  113. [More info in this post][tm_properties].
  114.  
  115. * Project drawer
  116.  
  117. The project drawer has been replaced with a file browser sidebar. This
  118. file browser has most Finder functions (labels, duplicate, etc.) and
  119. does SCM-badging, presently only for Subversion, Git, and Mercurial. In
  120. addition it has support for running commands (although somewhat
  121. proof-of-concept ATM) and can also do custom data sources, the API is
  122. not yet public but an SCM Status data source is included (the smart
  123. folder icon) which show SCM status for the current project. This data
  124. source works great together with the various SCM bundles.
  125.  
  126. * Buffer completion
  127.  
  128. This has been improved to work with the existing word suffix (in
  129. addition to prefix), use the new character class system, etc. [More
  130. details in this article][completion].
  131.  
  132. * Shell invocation
  133.  
  134. _Preferences → Terminal_ allows you to install `mate` which has a few
  135. new options and work when called as `sudo mate`. In addition you’ll
  136. find `rmate` which is a ruby implementation that you can use on a server
  137. over ssh. [See this article for more info][mate_and_rmate].
  138.  
  139. * Search in project / folder
  140.  
  141. Revamped the old “Find in Folder” and merged it with the regular
  142. find dialog. It’s now asynchronous, a lot faster, and more flexible.
  143. [See this article for more info][find].
  144.  
  145. * Format strings
  146.  
  147. Format strings are ubiquitous in TextMate 2. Even scopes in grammars
  148. are format strings (allowing you to capture document content for use in
  149. scopes) and format strings are more powerful than the 1.x variant. [See
  150. this article for more info][format_strings].
  151.  
  152. * Scopes
  153.  
  154. Scopes now contain info beyond document context. For example the
  155. `attr.scm` scopes give info about the current file’s SCM status,
  156. allowing using same key equivalent for different SCM systems.
  157.  
  158. The `dyn` scopes give info such as “is there a selection” (allowing
  159. to change key bindings only when there is or isn’t a selection), an
  160. example of this is overloading `{` to “wrap selection” (nicely), but
  161. leave the key alone when there is no selection. Another use-case could
  162. be to change tab to shift the text right (indent) only when there is a
  163. selection (common user request that I don’t plan to make native
  164. behavior).
  165.  
  166. You can also add your own stuff to the scope via the file and folder
  167. specific settings which allows e.g. adding `attr.test` to your unit
  168. tests and overload ⌘R for that scope or have certain snippets only
  169. fire in that scope (e.g. we have a `main⇥` snippet for C which inserts
  170. the venerable main function — makes sense to overload this for (C)
  171. unit tests, which generally would be regular C files).
  172.  
  173. * Scope selectors
  174.  
  175. The caret is actually between two scopes, the left and right characters
  176. scope. In 2.0 we finally allow you to explicitly target either side (or
  177. both), making the firing of certain overloads more correct. There are
  178. also a few other new things related to scope selectors, but a lot of it
  179. is still only implemented in the parser, so will delay the thorough
  180. explanation of this.
  181.  
  182. * Commands
  183.  
  184. Commands can require other bundles which allow them to reference
  185. support files in the required bundle. They can also declare which shell
  186. commands they need which means better error handling and also having
  187. TextMate try to find the required commands. Failing commands result in
  188. more graceful error dialogs. The output options for a command has been
  189. split into location and format. Commands can run without a document.
  190.  
  191. * Grammars
  192.  
  193. Grammars can be injected into existing scopes, for example there are
  194. now grammars for marking URLs, `TODO`, and similar which are injected
  195. into comments and other appropriate places.
  196.  
  197. Various other things related to parsing which require its own post.
  198.  
  199. * Semantic classes
  200.  
  201. Bundle items can now be assigned a semantic class. This allows us to
  202. query for e.g. `action.build || action.run` (for current scope) to find
  203. an appropriate build command (with a run command as fallback). The
  204. advantage of this is manyfold: ability to do tool bars, palettes, and
  205. unified key bindings, for example we have a single _proxy item_ bound to
  206. ⌘Y which does a query for `action.scm` finding all the SCM actions
  207. relevant for the current scope (remember scope now include SCM info,
  208. making it pick the proper SCM system).
  209.  
  210. Proxy items are a new construct but still at the proof-of-concept
  211. level, so more about this later.
  212.  
  213. TextMate itself will also do queries at various times, for example when
  214. opening a file it queries for import commands, where we include several
  215. to decompile AppleScript, pretty-print binary property lists, and
  216. similar. It also uses this system on save, so by default we now make new
  217. scripts with a shebang executable after save.
  218.  
  219. Like proxy items, this system is in its infancy.
  220.  
  221. * Managed bundles
  222.  
  223. When you open a file type for which you have no bundle, you’ll be
  224. asked to install one (if TextMate knows of one). Bundles are
  225. automatically kept up to date and you can see installed bundles (and
  226. install more) in _Preferences → Bundles_.
  227.  
  228. * Session restore
  229.  
  230. TextMate restores the full session which includes unsaved changes
  231. incase of abnormal exit.
  232. _______________________________________________
  233. textmate-dev mailing list
  234. textmate-dev@...
  235. http://lists.macromates.com/listinfo/textmate-dev
  236.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement