9

更新:我想通了。Ctrl-F 仅在未选择我正在搜索的方法时有效。游标只需要在方法名称中。

我刚刚升级到 TextMate2。

当我选择一个方法并使用Ctrl+F转到它的定义时,我得到:

> Failure running Jump to Method Definition

这是跟踪:

/Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/lib/rails/text_mate.rb:54:in `method_missing': undefined method `current_line' for TextMate:Module (NoMethodError)
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:13:in `initialize'
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147:in `new'
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147

我还可以选择“编辑命令”。这是“跳转到方法”定义的代码:

#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

RUBYLIB="$TM_BUNDLE_SUPPORT/lib:$RUBYLIB"
"${TM_RUBY:=ruby}" -- "${TM_BUNDLE_SUPPORT}/bin/jump_to_method_definition.rb"

我是否缺少环境变量?

4

1 回答 1

0

我想到了。Ctrl-F 仅在未选择我正在搜索的方法时有效。游标只需要在方法名称中。

于 2015-01-05T20:47:08.050 回答