开发者

⌃⇧L 'Wrap selection/word as a link' broken in TextMate

开发者 https://www.devze.com 2023-02-15 21:19 出处:网络
I regularly use ⌃⇧L in TextMate to wrap selection as a link. When I used it this morning, i got...

I regularly use ⌃⇧L in TextMate to wrap selection as a link. When I used it this morning, i got...

    /tmp/temp_textmate.RRepHN:13: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n'
    /tmp/temp_textmate.RRepHN:15: syntax error, unexpected keyword_when, expecting keyword_end
      when %r{http://www.(amazon.(?:com...
          ^
    /tmp/temp_textmate.RRepHN:15: syntax error, unexpected ':', expecting keyword_end
    /tmp/temp_textmate.RRepHN:17: syntax error, unexpected keyword_when, expecting keyword_end
      when %r{\A[a-zA-Z][a-zA-Z0-9.+-]*://.*\z}:
          ^
    /tmp/temp_textmate.RRepHN:17: syntax error, unexpected ':', expecting keyword_end
    /tmp/temp_textmate.RRepHN:19: syntax error, unexpected keyword_when, expecting keyword_end
      when %r{\A(www\..*|.*\.(com|uk|net|org|info))\z}:
          ^
    /tmp/temp_textmate.RRepHN:19: syntax error, unexpected ':', expecting keyword_end
    /tmp/temp_textmate.RRepHN:21: syntax error, unexpected keyword_when, expecting keyword_end
      when %r{\A.*\.(com|uk|net|org|info)\z}:
          ^
    /tmp/temp_textmate.RRepHN:21: syntax error, unexpected ':', expecting keyword_end
    /tmp/temp_textmate.RRepHN:23: syntax error, unexpected keyword_when, expecting keyword_end
      when %r{\A\S+\z}:
          ^
    /tmp/temp_textmate.RRepHN:23: syntax error, unexpected ':', expecting keyword_end
    /tmp/temp_textmate.RRepHN:27: warning: else without rescue is useless
    /tmp/temp_textmate.RRepHN:28: syntax error开发者_StackOverflow社区, unexpected keyword_end, expecting

I can't think of anything specific I might have done to cause the issue.

I have reloaded bundles and reinstalled TextMate.

I also tried using the code at http://svn.textmate.org/trunk/Bundles/Hyperlink%20Helper.tmbundle/Commands/Wrap%20Selection%20as%20Link.tmCommand.

None of them fixed the problem.

Anyone have any ideas?!

Thanks.


There shouldn't be a colon at the when ... line. You can edit the snippet and remove it in the Bundle Editor.

0

精彩评论

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