textmate

Setting up a snippet in Visual Studio Code with regex

一世执手 提交于 2019-12-01 09:48:49
问题 { "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

Why isn't 'gets' working in my Ruby script when I run from TextMate?

狂风中的少年 提交于 2019-12-01 07:56:53
问题 When running the following ruby script: puts gets.inspect On the terminal I am prompted for input and then the inspect output is shown, but if I run the same script from inside TextMate using the CMD+R shortcut then it just outputs nil as if there is no gets method. Why is this? From what I've read TextMate is supposed to show an input dialog when input from STDIN is requested by the script, but that isn't happening in this case. 回答1: See this blog entry; presumably you're on Snow Leopard?

Python Script Won't Run Via TextMate, OK in IDLE and Eclipse

梦想与她 提交于 2019-12-01 02:11:47
I wrote the following for a homework assignment and it works fine in IDLE and Eclipse running Python 3. However, I tried to run it from TextMate with the new line 1 -- which I found here -- to point it to Python 3 on the Mac. It seems to be running Python 3 but returns an error. It says: EOFError: EOF when reading a line. It's referring to line 5 below. Anyone know why? BTW, this TextMate issue is not part of the homework assignment, so I'm not trying to get homework help. I just want to figure out how to use TextMate with Python 3. #! /usr/local/bin/python3 # # Tests user string against two

How do I get git to use Textmate as my default editor?

天大地大妈咪最大 提交于 2019-11-30 15:52:16
问题 At the command-line, if I do mate <filepath> it opens up the right file for me in TextMate. But when I do: $ mate -v open: invalid option -- v Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments] Also, when I do git commit , I see this: $ git commit error: cannot run mate: No such file or directory error: There was a problem with the editor 'mate'. Please supply the message using either -m or -F option. My ~/

How do I get git to use Textmate as my default editor?

江枫思渺然 提交于 2019-11-30 15:39:05
At the command-line, if I do mate <filepath> it opens up the right file for me in TextMate. But when I do: $ mate -v open: invalid option -- v Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments] Also, when I do git commit , I see this: $ git commit error: cannot run mate: No such file or directory error: There was a problem with the editor 'mate'. Please supply the message using either -m or -F option. My ~/.bashprofile has these lines: #Set Textmate as my default editor from the command-line alias mate='open -a

Textmate autocompletion and class outline for PHP project [closed]

…衆ロ難τιáo~ 提交于 2019-11-30 14:25:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm using PDT, but want to switch to any lightweit editor. First I want to try Textmate. Eclipse has several useful features: class outlile to get list of properties and methods (with signature) to navigate; type hierarchy , it is like class outlile but it shows full inheritance tree; autocompletion for custom

TextMate toggle comment macro is broken

杀马特。学长 韩版系。学妹 提交于 2019-11-30 13:44:25
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 '' /bin/bash: -c: line 2: syntax error: unexpected end of file' This is driving me nuts I had this same

Textmate tab and de-tab selected block

梦想与她 提交于 2019-11-30 11:21:35
问题 Recently switched to Textmate on Mac for coding. On PC when ever I want to tab in or out a block of code I just highlight and press tab or shift+tab to move it in our out. It's very useful when you are adding an extra loop or conditional statement to a block of code to keep everything tidy and neatly indented. On Textmate however when I try this it just replaces my selected text with a tab. So is there a way to do tab and de-tab lines of code in textmate? 回答1: Indent: Alt+Tab Un-Indent: Shift

TextMate, rvm and TM_RUBY

我怕爱的太早我们不能终老 提交于 2019-11-30 10:01:39
In the TextMate RVM instructions the text it says to set TM_RUBY to /Users/wayne/.rvm/bin/textmate_ruby and in the image it shows it set to rvm-auto-ruby . I decided to set it to rvm-auto-ruby thinking that it would use RVM's default Ruby version. When running Command R in the RSpec.bundle having TM_RUBY set to rvm-auto-ruby will result in a load error . When you set it to textmate_ruby it works. The only problem here is that TextMate doesn't always use the default version of Ruby since it's hardcoded in that file. /Users/jspooner/.rvm/bin/textmate_ruby : #!/usr/bin/env bash if [[ -s "/Users

How can I send selected text (or a line) in TextMate to R running on Terminal

泪湿孤枕 提交于 2019-11-30 07:39:37
I just started using R on Terminal because its tab function. But I have no idea how to send the selected text in TextMate to the Terminal. Could expertise show me how to write the Command in TextMate? Thanks! Here is the exact TextMate command that I currently use. Hope it helps! rawText="$(cat | sed 's/ / /g;')" osascript -e 'on run(theCode)' \ -e ' tell application "Terminal"' \ -e ' do script theCode in window 1' \ -e ' end tell' \ -e 'end run' -- "$rawText" open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" & TextMate is MacOS, right? Is so, then this is from the R ?connections