如何配置 aptana 以即时运行我的脚本 [英] How to configure aptana for instant running of my script

查看:21
本文介绍了如何配置 aptana 以即时运行我的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个 Ruby on Rails 项目,有时我需要运行一个脚本.其他人似乎很高兴通过控制台运行自己的服务器和脚本.另一方面,我真的很想编写我的代码,按下一个按钮并让 Aptana 运行我的脚本.对于其中之一,我希望这将启用断点.

I'm working on a Ruby on Rails project and sometimes I need to run a script. Everyone else seems happy running their own server and scripts through the console. I on the other hand really want to write my code, press a button and have Aptana run my script. For one I hope this will enable breakpoints.

  1. 我如何确保它知道数据库类,目前我收到 TableName 未知名称错误.需要'table.rb'"让我无法加载文件错误.尝试使用/和 \ 添加文件路径,省略文件扩展名,使用 ' 或 "

  1. How do I make sure it knows the database classes, currently I get TableName unknown name error. "require 'table.rb'" gets me a cannot load file error. Tried adding the file path with / and \, omitting the file extension, using ' or "

运行当前文件的热键是什么(无论按下播放按钮是什么)?或者如何配置?

What is the hotkey for running current file (whatever pressing the play button is)? Or how can this be configured?

当我要求Aptana运行一个文件时,我想自动保存它,这个怎么配置?

When I ask Aptana to run a file, I want to automatically save it, how can this be configured?

我发现运行当前文件的热键是 Ctrl + F11,这不仅是一个不舒服的组合,它已经被 Kubuntu 使用并破坏了一些东西:(最近 Aptana 开始询问我想将代码运行为什么样的应用程序:1. Ruby Application(总是选择这个)2. Ruby 应用程序(?再次...)3. 测试::单元测试

I have found the hotkey for running current file is Ctrl + F11, not only is this an uncomfortable combination, it's already in use by Kubuntu and breaks things :( Also recently Aptana started asking what kind of application I want to run the code as: 1. Ruby Application (always choose this one) 2. Ruby Application (? again...) 3. Test::Unit Test

显然我需要更改热键手,让它默认选择 Ruby 应用程序.

Clearly I need to change the hotkey hand have it choose Ruby Application at default.

推荐答案

我认为您不必更改默认热键.

I don't think you have to change the default hot keys.

  1. 回答 Q1:您必须配置 Aptana IDE 才能了解您的 Rails 项目.请参考 ror_master 的链接.

  1. Answer to your Q1: You have to config your Aptana IDE to know your Rails project. please refer ror_master's link.

回答 Q2: alt + shift + x ,然后按所列选项中的 1 个(t、x 等)

Answer to your Q2: alt + shift + x , then press 1 of the listed options ( t, x, etc)

回答您的 Q3:我认为您的要求不是一个好的做法.在执行任何操作(例如运行单元测试)之前,请确保您必须手动保存所有文件.请让它成为一种习惯.

Answer to your Q3: Your demand is not a good practice, I think. Make sure that you have to MANUALLY save all the files before you do any operations like running a unit test. Please make it as a habit.

另外,你好像用的是像ubuntu这样的linux操作系统?如果是这样,请忘记 Aptana 或其他 IDE,VIM + 控制台 会让您满意,通过使用这些基本工具,您将更清楚自己在运行什么以及部署和部署所需的环境知识.运行 Rails 应用程序.

Further more, it seems that you are using linux OS like ubuntu? If so, please forget Aptana or other IDEs, VIM + console will satisfy you, and by using these basic tools, you will be more clear of what you are running and the necessary environment knowledge of deploying & running Rails application.

我有 3.5 年的 Eclipse 和 1 年的 Aptana 经验,是的,它们都是很棒的 IDE(几乎相同),但是,大约 1 年前我转向 VIM,这救了我的命.

I have 3.5 years of Eclipse and 1 year of Aptana experience, and yes, they are both great IDEs (almost the same), however, about 1 year ago I turn to VIM, which saved my life.

更新:感谢您提供如此多的奖励分数!以下是给您的更多提示:

UPDATED: thanks for the so much bonus scores! Here are more tips for you:

  1. 无论您使用什么(Aptana、Eclipse、Netbeans、VIM),请记住热键很重要.

  1. whatever you are using ( Aptana, Eclipse, Netbeans, VIM) , do remember that the HOTKEY is important.

在 Apatana/Eclipse 中,您应该知道这些键:

in Apatana/Eclipse, you should know these keys:

  1. 快速打开文件:ctrl + shift + r
  2. 在最近的文件中快速打开:ctrl + e
  3. 方法大纲:ctrl + o
  4. 开关: ctrl + F6 , ctrl + F7
  5. 从调用它的语句中检查方法:(将光标移到该方法上然后按)F3,或按 ctrl 键然后单击鼠标左键.
  6. 在 Apatana for Rails 中:
  1. quick open file: ctrl + shift + r
  2. quick open in recent file: ctrl + e
  3. method outline: ctrl + o
  4. switch : ctrl + F6 , ctrl + F7
  5. inspect a method from the statement where it was called: (move the cursor to it then press) F3, or press ctrl key then left click your mouse.
  6. in Apatana for Rails:
  1. ctrl + shift + c :快速跳转到控制器
  2. ctrl + shift + v :快速跳转查看
  3. ctrl + shift + m :快速跳转到模型

  • VIM 对我们来说有一个陡峭的学习曲线,根据我的经验,前 2 周是最困难的时期.记住谷歌是你最好的老师.这是我正在使用的 VIM 插件:

  • VIM has a steep learning curve for us, in my experience, the first 2 weeks is the hardest time. Remember google is your best teacher. and here are the VIM plugins that I am using:

    1. 自动合成
    2. fuzzy_file_finder
    3. greplace
    4. 先生
    5. 书呆子评论员
    6. 项目
    7. 导轨

  • 这篇文章值得一读:使用 VIM 作为完整的 ruby​​ on rails IDE

    这篇关于如何配置 aptana 以即时运行我的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆