textmate

Replace www.example.com w/ <a href=“http://www.example.com”>www.example.com</a>

自古美人都是妖i 提交于 2019-12-02 17:58:02
问题 I am not very good at regex, but I need to convert the following example from this <li>Creations by Carol - www.driedfloralcreations.com</li> to <li>Creations by Carol - <a href="http://www.driedfloralcreations.com" rel="external">www.driedfloralcreations.com</a></li> 回答1: If you're only looking for URLs in <li> elements formatted like the one in your question, it should be much simpler than a lot of the other suggested solutions. You don't really need to validate your URLs, I assume, you

Regex to replace values that include part of match in replacement in sublime?

有些话、适合烂在心里 提交于 2019-12-02 17:52:47
I've come up with this regex that finds all words that start with $ and contain _ underscores: \$(\w+)_(\w+) I'm basically searching for variables, like $var_foo etc. How do I replace stuff using the regex groups? For example, how can I remove the underscore and make the next letter uppercase, like $varFoo ? Dave Newton The replacement expression is: \$\1\u\2 \1 , \2 are the captures (or $1 , $2 ) \u up-cases (see the Replacement String Syntax section ). See the Regular Expressions chapter (in the TextMate docs ) for more information. There's already a package that does this, and more: Brief

Where to find a list of scopes for Sublime2 (or textMate?)

无人久伴 提交于 2019-12-02 14:02:57
in .tmTheme files the scope key defines how a element is highlighted: <dict> <key>name</key> <string>HTML: Attribute Values</string> <key>scope</key> <string>meta.tag string.quoted, meta.tag string.quoted constant.character.entity</string> <key>settings</key> <dict> <key>background</key> <string>#FFFFFF</string> <key>fontStyle</key> <string></string> <key>foreground</key> <string>#2aa198</string> </dict> </dict> where can I find a list of all scopes supported by these apps, so I can create my own style? Unfortunately there doesn't seem to be any such comprehensive list. However, if you press

Thinking of moving from TextMate to vim for Rails dev. What do I need?

a 夏天 提交于 2019-12-02 14:01:58
I do Ruby on Rails development pretty much exclusively. I currently develop in OS X using TextMate. I have a virtual machine running to emulate as closely as possible the environment my app will be deployed into, and I mount the code on a Samba share into OS X from the VM guest. From there I open with TextMate and code away. I'm beginning to think that with the proper plugins and time spent learning, I could be much more productive in vim directly on the VM. Right now my TextMate is basically stock, though I do find the ProjectPlus plugin indispensable. What I'm looking for are some

Replace www.example.com w/ <a href=“http://www.example.com”>www.example.com</a>

我与影子孤独终老i 提交于 2019-12-02 09:40:49
I am not very good at regex, but I need to convert the following example from this <li>Creations by Carol - www.driedfloralcreations.com</li> to <li>Creations by Carol - <a href="http://www.driedfloralcreations.com" rel="external">www.driedfloralcreations.com</a></li> If you're only looking for URLs in <li> elements formatted like the one in your question, it should be much simpler than a lot of the other suggested solutions. You don't really need to validate your URLs, I assume, you just want to take a list of site names and URLs and turn the URLs into links. Your search pattern could be: <li

TextMate: Comment-line shortcut does not work anymore (Cmd-/ or Cmd-Shift-7 on my swiss layout)

半腔热情 提交于 2019-12-02 05:35:19
I experience a quite strange behavior in TextMate since some time. I had troubles to use the keyboard shortcut for commenting a line (which is Cmd-/ or on my swiss layout it is CMD + SHIFT + 7 where SHIFT + 7 results in a / ) a few times already since I switched to Lion 2 months ago (before I never had any problems). I then used to restart TextMate and it worked again. But now, restart doesn't solve the problem. So I went into the Bundle Editor and tried to reset the shortcut, and there I can set it to anything I like, but not to Cmd-/ ! Nothing happens when I want to record the shortcut and

Calling vim or TextMate from emacs

天涯浪子 提交于 2019-12-01 20:44:06
问题 I've been using vi quite a while, and with a Mac, I sometimes use TextMate, and finally, I found the greatness of emacs. And, it's very likely that I settle in emacs. The problem is, I sometimes need the other (vi/TextMate) editor for doing something. It's not that emacs doesn't have the feature, it's just that I need the feature right now, and I know how to do that with the 'other' editor. And the same is true with the other editor. My question is how can I launch the one editor from the

Calling vim or TextMate from emacs

廉价感情. 提交于 2019-12-01 19:31:59
I've been using vi quite a while, and with a Mac, I sometimes use TextMate, and finally, I found the greatness of emacs. And, it's very likely that I settle in emacs. The problem is, I sometimes need the other (vi/TextMate) editor for doing something. It's not that emacs doesn't have the feature, it's just that I need the feature right now, and I know how to do that with the 'other' editor. And the same is true with the other editor. My question is how can I launch the one editor from the other. It's not just launching an app, but launching an app with the file that I'm editing. How can I

Textmate 2 Alpha showing references for deleted files

删除回忆录丶 提交于 2019-12-01 19:08:17
I know it's an Alpha product, but I think this is a setting rather than a bug. When I delete files from with textmate file manager, the file is deleted but remains in the project with a red 'X' through it. See the image below. I have checked on the file system and it is not there, and have also git commited and pushed the changes to my github repo. Any ideas? EDIT Cross-posted to the Textmate mailing list. No answers so far. http://textmate.1073791.n5.nabble.com/Textmate-2-Alpha-and-deleting-files-td26669.html SOLUTION As per danodonovan's suggestion, I looked into the git issues. Turns out

Setting up a snippet in Visual Studio Code with regex

北城余情 提交于 2019-12-01 13:30:56
{ "Comment": { "prefix": "#", "body": "<!-- ${TM_FILEPATH/([^/]*\/[^/]*)$/$1/} -->" } } I have set up the about code snippet, the purpose is to add a comment that adds the file's base directory and file name <!-- templates/base.html --> like this but discards the rest of the path. I believe this is originally based on TextMate snippets. I have tried everything but I can't get it to work, it's probably something silly but I don't see what I'm doing wrong. Using just TM_FILEPATH without the regex results in <!-- /Users/johndoe/Sites/blog/blog/templates/base.html --> I used this https://code