textmate

Regex to find A and not B on a line

点点圈 提交于 2019-12-22 07:01:16
问题 I'm looking for a regex to search my python program to find all lines where foo , but not bar , is passed into a method as a keyword argument. I'm playing around with lookahead and lookbehind assertions, but not having much luck. Any help? Thanks 回答1: If you have a string foo that you want to find and another string bar that must not be present, you can use this: ^(?!.*bar).*foo Creating a regular expression that exactly meets all your requirements is very difficult as Python code is not a

Converting Emacs/vim highlighting to TextMate (for SublimeText)

北城以北 提交于 2019-12-21 21:44:12
问题 I have syntax highlighting files for Pyret in vim (.vim) and emacs (.el) and would like to use them in Sublime Text (3). According to this answer and other research, Sublime Text style themes are written in TextMate format. There exists a tool to help convert from TextMate to Emacs, but I contacted the author and he isn't aware of any tools to help facilitate the opposite conversion. A similar question was asked (re: vim) but not answered a year ago: .vim syntax highlighting to textmate or

Autocomplete in Textmate

a 夏天 提交于 2019-12-21 21:15:12
问题 Sometimes I watch screen casts where someone is using text mate. I'm a rails developer, so these are rails screen casts. They'll type something like: def for example and "end" will automatically appear underneath. I do have the bundle for Rails enabled - why doesn't this happen for me? Thanks! 回答1: The file you're editing needs the right extension ( .rb in your case) to make Textmate understand the right bundle to use. What do you see down at the bottom of your TM window? (After Line# and

How can I send an line in TextMate to an irb process running in an Terminal window?

女生的网名这么多〃 提交于 2019-12-21 20:39:13
问题 I often code with a TextMate window open, and an irb process in a Terminal window adjacent to it. I want to be able to press a key sequence in TextMate which does the following: Copies the current selection, or if there is none, the current line. Pastes it in the topmost Terminal window that is running irb. Presses enter so that the line of code is executed in the irb window. I used this style of interactive development when coding in R and found it very convenient. I'm pretty sure emacs and

Using RVM with different gemsets in TextMate

僤鯓⒐⒋嵵緔 提交于 2019-12-21 12:57:49
问题 I have set up RVM and made individual gemsets for my projects as per the RVM best practices. Now running a test file in TextMate dosen't work and I have read here what to do. The problem is that it won't work because the guide expects me to have just one gemset (they call it "Rails3"). I normally have 2-3 projects open at a time (using different gemsets) so I can't effectively use this approach. Have any of you solved that problem? 回答1: I've found the RVM wrappers method to be very buggy, and

Using RVM with different gemsets in TextMate

独自空忆成欢 提交于 2019-12-21 12:57:21
问题 I have set up RVM and made individual gemsets for my projects as per the RVM best practices. Now running a test file in TextMate dosen't work and I have read here what to do. The problem is that it won't work because the guide expects me to have just one gemset (they call it "Rails3"). I normally have 2-3 projects open at a time (using different gemsets) so I can't effectively use this approach. Have any of you solved that problem? 回答1: I've found the RVM wrappers method to be very buggy, and

Is it possible to import TextMate themes to IntelliJ IDEA?

廉价感情. 提交于 2019-12-20 14:09:52
问题 Is it any way to automate import TextMate themes to IntelliJ IDEA, like converter between these two formats? 回答1: Please check the converter created by JetBrains. This is a tool to convert color schemes from TextMate to IntelliJ Platform based products such as IntelliJ IDEA, RubyMine and PyCharm. Since the way highlighting works in TextMate is not an exact match for the capabilities of IntelliJ Platform, we try to perform an intelligent mapping between the two. In particular, color

Is there a way to make a link clickable in the OSX Terminal?

巧了我就是萌 提交于 2019-12-20 08:01:07
问题 I am planning on developing an Mxmlc to Textmate formatter, one that formats mxmlc errors as clickable links, so you can open them up quickly in Textmate as Textmate has a url scheme e.g.: txmt://open/?url=file://~/.bash_profile&line=11&column=2. I am wondering if it is possible to display links in your OSX terminal, that are also clickable, e.g. by changing the PS1 variable or so. ps. I don't want to use HTML that runs in the Textmate environment. 回答1: Before OSX Lion: cmd + shift + double

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

戏子无情 提交于 2019-12-20 04:33:14
问题 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

TextMate toggle comment macro is broken

邮差的信 提交于 2019-12-18 15:55:43
问题 My laptop crashed and when it rebooted, "cmd /" (toggle comment) was broken. When I try to toggle comments on a line that only contains "foo", I get this output in my code instead of "# foo": /tmp/temp_textmate.2erfLj:68:in /bin/bash: -c: line 0: unexpected EOF while looking for matching '' /bin/bash: -c: line 1: syntax error: unexpected end of filemap' for " foo":String (NoMethodError) from /tmp/temp_textmate.2erfLj:48:in /bin/bash: -c: line 0: unexpected EOF while looking for matching ''