开发者

editing textmate bundle is not applied...why?

I'm coding in开发者_运维知识库 Ruby and I code like this

iterator.each {|item| do_something}

not like this(this is default snippet in textmate(ea|->)

iterator.each { |item| do_something }

so, I've just edit it using 'Bundles -> Bundle Editor -> Edit Snippets...' menu

as its result, each {|e| __}.tmDelta file was created in ~/Library/Application Support/TextMate/Bundles/Ruby.tmbundle/Snippets directory

BUT!, if I typed 'ea' and TAB, no change.

what's wrong?


To be safe you should make a copy of the snippet you want to customize and put it in a custom bundle. Once you are done, simply deactivate the original snippet.

  1. In the Bundle Editor, hit the "+" menu at the bottom left, choose "New Bundle" and give it a name.
  2. Make a copy (with the "++" button) of the snippet you want to customize then drag it to your custom bundle.
  3. Edit the snippet to your liking.

After that you need to deactivate the original snippet, you have two ways to do that: the first is quick and dirty the other is cleaner.

The first way:

  1. Find the original bundle in the list and remove its "Tab Trigger".
  2. No step 2.

The second way:

  1. Click on the name of the "Ruby" bundle to show it's structure.
  2. Find the original snippet under "Menu Structure" and drag it under "Excluded Items".

Done.


You also might want to try Bundles -> Bundle Editor -> Reload Bundles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜