Playframework:一些 Gedit 片段和外部工具怎么样?

发布于 2024-10-03 16:43:32 字数 167 浏览 0 评论 0原文

我是 ubuntu 用户,gedit 是我首选的编辑器。 Eclipse 是我首选的 java 项目编辑器,但在面向 RAD java 的 play 框架的特定情况下,我更喜欢使用像 gedit 这样的轻型编辑器。

所以问题是:是否有计划为 playframework 提供一些 gedit 插件/片段?

I am an ubuntu user and gedit is my preferred editor. Eclipse is my preferred editor for java project, but in the specific case of play framework, RAD java oriented, i'll prefer to use a light editor like gedit.

So the question is: Is there a plan to provide some gedit plugin/snippets for the playframework ?

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

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

发布评论

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

评论(2

久伴你 2024-10-10 16:43:32

当然,在下一个版本的发布中,似乎没有任何计划发布 GEdit 框架的细节。我认为添加 TextMate 捆绑包是因为这是 Guillaume 在为客户构建 Play 应用程序时使用的开发环境,因此加快他的开发速度是有意义的。

没有理由不能在 Play 核心框架之外创建此功能作为模块或插件。

至于 Niels 关于 gedit://myfile:3 的问题,GEdit 似乎支持打开特定行号的文件,但我无法找到从注册的 URL 打开 GEdit 的方法(再次像 TextMate 一样)。这应该是可能的,但是我不是一个足够强大的 Linux 开发人员,不知道如何操作,但这只是将 URL 以某种格式映射

gedit://open?url=file://%s&line=%s

到 linux 命令的情况

gedit +<line> <file>

Certainly in the next version of the release, there does not seem to be any plans to release GEdit specifics to the framework. I think the TextMate bundle was added as this was the development environment Guillaume uses when building his Play applications for clients, so its made sense to speed his development up.

There is no reason why this functionality could not be created outside of the Play core framework, as a module or plugin.

As for Niels question about the gedit://myfile:3, it does appear that GEdit supports opening a file to a specific line number, but I was unable to find a way to open GEdit from a registered URL (again like TextMate). This should be possible, however I am not a strong enough Linux developer to know how, but it would simply be a case of mapping the URL in a format such as

gedit://open?url=file://%s&line=%s

to the linux command

gedit +<line> <file>
耳根太软 2024-10-10 16:43:32

可以使用脚本将播放 url 转换为 gedit 兼容的命令行。

我做了一个名为“textmate”的小脚本来进行转换(我认为有一些更好的方法可以做到这一点,但我不是 grep 大师):

#!/bin/bash
URL=$1
FILE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d':' -f 2 | cut -d'&' -f 1`
LINE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d'=' -f 2`
gedit +$LINE $FILE &

在 firefox 中,您可以将此脚本与 txmt 协议相关联,如下所述 http://kb.mozillazine.org/Register_protocol#Firefox_3.5_and_above

It is possible to convert the play url to a gedit compatible commande line with a script.

I did a small script named "textmate" that does the conversion (I think there is some better way to do that but I am not a grep master) :

#!/bin/bash
URL=$1
FILE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d':' -f 2 | cut -d'&' -f 1`
LINE=`echo $URL | grep -o -E 'file(.*?)line=(.*)' | cut -d'=' -f 2`
gedit +$LINE $FILE &

In firefox you can associate this script with the txmt protocol as described here http://kb.mozillazine.org/Register_protocol#Firefox_3.5_and_above

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