textmate

IN TextMate I can't create partials with Rails tmbundle

青春壹個敷衍的年華 提交于 2019-12-03 15:50:11
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:355:in `to_plist': An object in the argument tree could not be converted (ArgumentError) from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:355:in `request_string_core' from /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:193:in `request_string' from /Users/pma/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/create_partial_from_selection.rb:23:in `<main>' I installed the RoR bundle from: https://github.com/drnic/ruby-on-rails-tmbundle.git Using rvm. Are

VIM: RSync on save

天涯浪子 提交于 2019-12-03 13:46:38
问题 I'm looking for a way to map the :w command so that when I use it, it will rsync the current directory and save the file in question. Ideally, the response generated by the rsync command should be returned in vim, but not in the the current file, but rather as a tooltip or something. I managed to achieve this in TextMate and am now looking to start working with Vim. I've been trying things like :map w :w|!rsync . but that doesn't seem to work (I'm a beginner :)) I'd appreciate any help.

Formatting the date in unix to include suffix on day (st, nd, rd and th)

喜欢而已 提交于 2019-12-03 13:03:30
How can I add the suffix on the day number of a unix date? I'll explain. I have a TextMate bundle snippit that writes out today's date. It uses unix date and formatting. Here is the code: `date +%A` `date +%d` `date +%B` `date +%Y` It outputs: Monday 22 March 2010 I would like to add the suffix to the day ( st , nd , rd and th ) like so: Monday 22nd March 2010 As far as I can see, there is no native function in the unix date formatting, like there is in PHP (j). How would I achieve this in unix? A complicated regex on the day number? I have something similar working on a Linux machine (Ubuntu

.vim syntax highlighting to textmate or sublime text 2 [closed]

徘徊边缘 提交于 2019-12-03 11:30:28
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it focuses on one problem only by editing this post . I have a .vim script for highlighting a specific program's syntax (Mplus SEM software). I am wondering if there is an easy way to convert this to textmate or sublime text 2 or do I need to write my own. Best and thanks in advance. Vim script Note: I did not write this script, but would like to thank J Micah Roos. EDIT: Not really an answer, but I gave up trying to find a way and made my

How can I find the character code of a special character in my text editor?

跟風遠走 提交于 2019-12-03 11:25:28
When pasting text from outside sources into a plain-text editor (e.g. TextMate or Sublime Text 2) a common problem is that special characters are often pasted in as well. Some of these characters render fine, but depending on the source, some might not display correctly (usually showing up as a question mark with a box around it). So this is actually 2 questions: Given a special character (e.g., ’ or ♥) can I determine the UTF-8 character code used to display that character from inside my text editor, and/or convert those characters to their character codes? For those "extra-special"

Highlighting trailing whitespace in Textmate for Python?

元气小坏坏 提交于 2019-12-03 11:24:49
I would like to do something like this Textmate tip, so that trailing whitespace are always highlighted in some way when I code something in Python - it makes it easier to correct it immediately and other editors such as Emacs can do it. Unfortunately the discussion after that post seems to suggest it's difficult to do. For me the invalid.trailing-whitespace scope selector is not even visible in the preferences after following this tip. Has anyone else had any success with this? ppierre This code works (but not with comment) : { scopeName = 'source.whitespace'; patterns = ( { name = 'source

How to make Gedit look like Textmate?

戏子无情 提交于 2019-12-03 09:38:26
问题 I want to make Gedit look like Textmate, and act like it too. I have read many tutorials on the net, but can't find an easy to follow guide. I am using Ubuntu 11.04 and would like to use it for Ruby on Rails and other web languages. I want only the core functions such as class/project browser and syntax highlighting. Can someone provide an easy to follow guide or point me in the right direction? Thanks a lot in advance! 回答1: sudo apt-add-repository ppa:ubuntu-on-rails/ppa sudo apt-get update

Can't build XCode 4 Project from Textmate

家住魔仙堡 提交于 2019-12-03 08:27:59
I've opened a newly created XCode 4 project in TextMate (by dropping the project folder on the TextMate icon like the manual suggests) and have attempted to build it using the Command-B shortcut and selecting 2 for an XCode build. I get the following error xcodebuild: error: invalid option '-activebuildstyle' Usage: xcodebuild [-project <projectname>] [[-target <targetname>]...|-alltargets] [-configuration <configurationname>] [-arch <architecture>]... [-sdk [<sdkname>|<sdkpath>]] [<buildsetting>=<value>]... [<buildaction>]... xcodebuild -workspace <workspacename> -scheme <schemeName> [

How do I highlight the current TextMate document in the project drawer?

主宰稳场 提交于 2019-12-03 07:27:30
I keep forgetting where to find this in the menus. I often open a document using (for example) Find in Project… and then want to know where it is in the project drawer (especially when it's buried deep down in the folder hierarchy. How do I highlight the current document in the project drawer? Daryl Spitzer TexMate 1 It's "hiding" in the File menu as "Reveal in Project" (with the keyboard shortcut control ⌘ R ). TextMate 2 It's "hiding" in the Go menu as "Current Document" (with the keyboard shortcut control ⌘ R ). 来源: https://stackoverflow.com/questions/3393334/how-do-i-highlight-the-current

“Sort Lines in Selection” for Xcode 4

不打扰是莪最后的温柔 提交于 2019-12-03 06:43:53
问题 I like Textmate's "Sort Lines in Selection" feature a lot. Is there something similar for Xcode 4? If not, what would be the best way to integrate such a feature (a plugin, Applescript, ...)? 回答1: You can do this with Automator in Lion. Start Automator and select "Service" Find and drag "Run Shell Script" into the workflow panel Select "Output replaces selected text" Type sort -f into the "Run Shell Script" textfield Save Now you can sort lines in any textfield. Select some text and right