`
aideehorn
  • 浏览: 256817 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

TextMate: personal bundle

阅读更多

 

useful bundle svn repository URL  http://macromates.com/svn/Bundles/trunk/Review/Bundles/

Have you ever run into problems making changes to a TextMate bundle, or updating a bundle, where changes weren’t showing up or being updated? These and a myriad of other “problems” can be explained by having multiple copies of bundles on your drive. Even after a year of using TextMate, I still get confused about how it works, and in what order. On the TextMate Mailing List, Haris Skiadas posted an excellent explanation of the often-confusing bundle situation in TextMate.

    The bundle mechanism seems a bit daunting at first, but it is actually fairly logical. There are four locations where bundles/bundle items may reside:

       1. Inside the TextMate application
       2. In /Library/Application Support/TextMate/Bundles
       3. In ~/Library/Application Support/TextMate/Bundles , where ~ is the current user’s home directory
       4. ~/Library/Application Support/TextMate/Pristine Copy/Bundles

    TextMate ships with a number of bundles, so that someone could start using it immediately. It contains the current version of those bundles at the time of packaging, and it doesn’t contain all the bundles, just the most often used ones.

    If you want a newer version of a bundle, you have the option of checking things out from the repository. It is recommended that you do that in /Library/Application Support/TextMate/Bundles.

    Now, each user might edit/add bundle items, and those changes are recorded in ~/Library/Application Support/TextMate/Bundles. This contains typically “delta” files, that record the local differences to the command, for instance if you change a shortcut or something.

    And finally we come to the Pristine Copy directory. When you get a new bundle not via the repository, but via downloading a .tmBundle file, then this initial version of this bundle is stored in this directory. It is supposed to be the bundle in its “pristine state”, and any modifications you do to the bundle are recorded in ~/Library/Application Support/TextMate/Bundles. so you could return to that pristine state by removing these local modifications. It is supposed to be used only for bundles not shipping with TM, since there is already a “pristine state” for those bundles inside the TM application.


 

 

 

 

 

SNIPPET NAME ### ACTIVATION ### SCOPE SELECTOR

 

SNIPPET CODE

---------------------------------------------------------------------------------------------------------------------------- 

 

----------------------------------------------------------------------------------------------------------------------------

 

class="" id="" +   ###  cci   ### text, text.html

 

${1:id="${2:id}"} ${3:class="${4:class}"} 

 

 

Html Comment     ###  >>   ### text, text.html     

 

<!-- ${0:Comment} -->

 

 

Table simple+       ###  tablee  ### text, text.html     

<table>
	<tr><td>${0:Data}</td></tr>
</table>

 

TR (Table row)+   ### tr ### text, text.html     

 

<tr><td>${0:Data}</td></tr>

 

 

 TD (Table data cell)+  ### td ### text, text.html     

 

<td>${0:$TM_SELECTED_TEXT}</td>

 

 

 button_to (controller, action, id) + ###  buto ### text.html.ruby, text

 

<%= button_to "${1:link text...}" ${2:, :action => "${3:action}"} ${4:${5:, :controller => "${6:controller}"} ${7:, :id => "${8:id}"}} %>

 

 

form_remote_tag (url, id, submit_tag) +   ### remt  ###text.html.ruby, text

 

<% form_remote_tag ${1::url => {:action => :${2:action}${3:, :id => ${4:id}}\}}  do %> 
${5:<%= submit_tag "${6:Editing...}" %> }
<% end %> 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics