在编辑器中自动打开Rails生成迁移文件

发布于 2024-10-08 07:15:16 字数 99 浏览 1 评论 0原文

是否可以配置 Rails,以便在运行 rails g migration name_of_migration 后,它会自动在 TextMate 中打开该文件?

Is it possible to configure Rails so that after running rails g migration name_of_migration, it automatically opens that file in TextMate?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南街九尾狐 2024-10-15 07:15:16

您可以使用以下命令创建别名:

alias last_migration='ls db/migrate/* | tail -n1 | xargs open -a "Textmate"'

然后从终端运行它:

last_migration

You could create an alias with this:

alias last_migration='ls db/migrate/* | tail -n1 | xargs open -a "Textmate"'

and then run it from your terminal:

last_migration
孤寂小茶 2024-10-15 07:15:16

否,但您可以使用以下快捷键在 Textmate 中生成迁移 -

“Shift + Control + M”

No, but you can generate migration in Textmate, using the following shortcut -

"Shift + Control + M"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文