PreviousTracker indexSee it online !

(212/212) 551 - Allow writting macros in Fantom

I found the [Fantom language](https://fantom.org) to be very good alternative to BeanShell and suitable as a scripting language to write JEdit macros. Please consider supporting it. JEdit is a very good text editor but it's now inferior to other JavaScripts/Python/Lua based editors because lacking of good plugins. I think part of the problem is using BeanShell as the scripting language. BeanShell is... just Java! It's convenient because it's familiar so Java devs don't have to learn new languages to write scripts, but it's the same plain old wordy Java that discourage new users to write scripts for JEdit. I suggest extend to support other JVM languages like Groovy, Fantom... I myself recommend Fantom. Please consider my suggestion. Thanks.

Submitted ruanjiaxing - 2020-05-24 14:38:52.050000 Assigned
Priority 5 Labels
Status open Group none
Resolution None

Comments

2020-05-24 20:03:19.579000
daleanson

What plugins are lacking?

Several other languages are already supported, take a look at the Clojure, Groovy, Oolong, Scheme, and Python plugins. There may be more, there are a lot of plugins, which makes me ask again, what plugins are lacking? What are these other editors you're talking about?

2020-05-25 03:24:08.713000
ruanjiaxing

Lua based editor: TextAdept and many, I don't like Lua so I don't use them, but there are a lot.

Python based editor: the most notable is Sublime Text, there also be CudaText and many.

JavaScript based editor: VSCode, Atom, Brackets... too many.

Note: they might not be written in said language, but they allow extends the editor by writing plugins/extensions/scripts using said language.

Editor like VSCode is more or less on par with an IDE. Install the appropriate plugin and you will really have an IDE.

JEdit is definitely lacking many plugins. For example, language server plugin. By utilizing language server, they provide Visual Studio level of code completion/intellisense for a lot of language: Java, JavaScript, C#, Objective C, Object Pascal... Integrated VCS + build tool support let them become a complete development environment.

I love JEdit because it's the truly cross platform editor, thanks to the awesomeness of Java. I use it on Linux, OpenBSD and HaikuOS. But the fact I have to said JEdit's plugins are mostly outdated and looked like a toy compared with VSCode or Sublime Text. Sorry.

2020-05-25 03:26:45.323000
ruanjiaxing

I think you are not used VSCode or Sublime Text. The number of plugins of JEditor could be considered as poor (too few) compared to them. This is not "a lot of" at all.

2020-05-25 04:45:32.728000
ruanjiaxing

Sorry. I have confused between plugins and macros.** This ticket I asked about a plugin allow writing macros in Fantom (or possibly, Groovy)** as there are already plugins allow writting macros in Java (javamacros) and JavaScript (javascriptshell). When I wrote the messages above I'm deprived of sleep and very tired so I have confused between plugin and macros. JEdit definitely needs more plugins, but this is not what this ticket is about. Sorry for the misleading I have made.

As my little research showed that any JVM languages could consumes the JEdit API could be used to develop JEdit plugins, so we are already possible to use Fantom (or Groovy) to develop plugins for JEdit? BeanShell is the default language for JEdit macros but not for develop JEdit plugins and I have badly confused it. Most of JEdit plugins I saw on the Plugin Central were written in Java itself.

Let's back to what this ticket is about, macros in Fantom (or Groovy).

2020-05-25 15:57:33.269000
ruanjiaxing

Fantom is a JVM language but it compiles to fcode, not Java bytecode. When running, the Fantom interpreter convert fcode into bytecode and run it on the JVM. We can't use the plugin JavaMacros because there is no .class file, so a special plugin like what for JavaScriptShell is needed. I checked Groovy also compiles to .class file so I think it should work with JavaMacros plugin, but Fantom needs special treatment to work as a language for JEdit macros.

2020-05-25 16:51:16.128000
daleanson

Is there something specific you're looking for a macro to do? There are a lot of macros available on the community site (which doesn't work well), plus there is the MacroManager plugin (which seems to be broken at the moment).

2020-05-25 22:24:08.467000
mike-y

I've been looking for the roman numerals macro. I reverse engineered the
link (which was broken) to tell me the filenames and was able to get google
to find the macros on some japanese website for download... back in
2013ish. But I have lost the original download (I think).. I thought there
was at least one of the roman numeral macros that would scan whole files
for roman numerals not just convert the selection, but maybe I'm
remembering some other methodology than jedit/macros.

I've also tried to figure out how to get an account on the jedit community
website. and never been able to get my openID to function.


On Mon, May 25, 2020 at 11:51 AM Dale Anson via jEdit-devel <
jedit-devel@lists.sourceforge.net> wrote:

> Is there something specific you're looking for a macro to do? There are a
> lot of macros available on the community site (which doesn't work well),
> plus there is the MacroManager plugin (which seems to be broken at the
> moment).
> ------------------------------
>
> * [feature-requests:#551]
> <https://sourceforge.net/p/jedit/feature-requests/551/> Allow writting
> macros in Fantom*
>
> *Status:* open
> *Group:* none
> *Created:* Sun May 24, 2020 02:38 PM UTC by ruanjiaxing
> *Last Updated:* Mon May 25, 2020 03:57 PM UTC
> *Owner:* nobody
>
> I found the Fantom language <https://fantom.org> to be very good
> alternative to BeanShell and suitable as a scripting language to write
> JEdit macros. Please consider supporting it. JEdit is a very good text
> editor but it's now inferior to other JavaScripts/Python/Lua based editors
> because lacking of good plugins. I think part of the problem is using
> BeanShell as the scripting language. BeanShell is... just Java! It's
> convenient because it's familiar so Java devs don't have to learn new
> languages to write scripts, but it's the same plain old wordy Java that
> discourage new users to write scripts for JEdit. I suggest extend to
> support other JVM languages like Groovy, Fantom... I myself recommend
> Fantom. Please consider my suggestion. Thanks.
> ------------------------------
>
> Sent from sourceforge.net because jedit-devel@lists.sourceforge.net is
> subscribed to https://sourceforge.net/p/jedit/feature-requests/
>
> To unsubscribe from further messages, a project admin can change settings
> at https://sourceforge.net/p/jedit/admin/feature-requests/options. Or, if
> this is a mailing list, you can unsubscribe from the mailing list.
> --
> -----------------------------------------------
> jEdit Developers' List
> jEdit-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jedit-devel
>

alternate (3.6Kio)

2020-05-26 05:32:11.461000
ruanjiaxing

I can't get an account on the JEdit forum, too. I send them an email as they said but they never reply me.

2020-05-26 05:57:53.460000
ruanjiaxing

I learned the old Java and can't keep up with modern Java, so I made a switch to Fantom and never looked back. BeanShell IMHO is just a stripped down Java. I want to be able to use my familiar language to write macros to extend JEdit. But as you said on my other ticket, I think I should learn to write an actual JEdit plugin. So no, I don't need any specific functions from a macros but only want to write macros in my favorite language to automate boring job and also extend the editor on the way when using JEdit as my main text editor. I think I could do more with Fantom than BeanShell because, IHMO, Fantom is more powerful than BeanShell.

I think more options is better than just one. The JavascriptShell plugin advertised that they also added the ability to write macros in Javascript (I'm not tested it yet) so I think there is no reason something similar for Fantom, FantomShell, is impossible. Fantom itself also included a shell, fansh. So I think it is perfectly matched up with JEdit to become an alternative languages for macros alongside of BeanShell.

2020-05-26 17:24:11.416000
daleanson

http://community.jedit.org/?q=filestore/download/20

Link to the numeric conversion macros, however, the download seems to be corrupt.