| jEdit Homepage: | http://www.jedit.org/ |
|---|---|
| Wikipedia: | https://en.wikipedia.org/wiki/JEdit |
jEdit is a mature programmer's text editor with hundreds (counting the time developing plugins) of person-years of development behind it.
In less than no time it can be configured into an IDE for almost any language. For this HowTo we will use the computer algebra system
FriCAS. Hence we assume you have fricas installed and you are using some Lin(ux) or Windows 10/WSL. The editor jEdit can be installed by apt/deb (used below) or by a method described on the jEdit Homepage.
$ sudo apt install jedit $ apt list jedit Listing... Done jedit/bionic,bionic,now 5.5.0+dfsg-1 all [installed] $ jedit -version jEdit 5.5.0 $ jedit -usage
| Start: | jEdit |
|---|
$ jedit &
| Mark: | [x] the plugins in the Plugin Manager. |
|---|
- Console
- ContextMenu
- ProjectViewer
- Templates
- TextFilter
- GnuRegexp
- BufferList
- CharacterMap
- Code2HTML
- ImageViewer
- InfoViewer
- JDiffPlugin
- MarkdownPlugin
- SpellCheck
Now you should see some new (docked) windows, BufferList
for instance.
| Click: | on BufferList in the right docking area. |
|---|
It will expand.
Same for the Console.
| Enter: | some commands, and check if ~/.jedit is available. |
|---|---|
| Warning: | This is crucial for the further installation. |
Copy the mode/spad.xml file to ~/.jedit/modes/ (see below) and
add
<MODE NAME="spad" FILE="spad.xml" FILE_NAME_GLOB="*.{spad,input}" />
to the file ~/.jedit/modes/catalog. The code below will just perform these steps.
$ cp -v spad.xml ~/.jedit/modes/ $ export jcat_tmp=~/.jedit/modes/catalog $ cat $jcat_tmp add_spad_to_catalog.txt > $jcat_tmp
| NOTE: | Now retart jEdit, i.e. close and reopen (jedit &). |
|---|
| Menu: | File -> New In Mode |
|---|
Find spad (hopefully).
Syntax highlighting: Enter some keywords.
The color scheme can be adjusted of course.
Plugin -> Console -> compile & run
As above, configure the context menu.
Press the [+] button.
Look for Run current buffer ...
Repeat the above steps in order to add
Compile current buffer ...
Now the menu item spad (or whatever label you have given) should appear.
First, copy the templates to the ~/.jedit/templates folder
$ cp -v templates/spad_* ~/.jedit/templates/ 'templates/spad_category.vm' -> '/home/kfp/.jedit/templates/spad_category.vm' 'templates/spad_domain.vm' -> '/home/kfp/.jedit/templates/spad_domain.vm' 'templates/spad_package.vm' -> '/home/kfp/.jedit/templates/spad_package.vm' 'templates/spad_unittest.vm' -> '/home/kfp/.jedit/templates/spad_unittest.vm'
Plugins -> Templates -> Template Tree
Dock the floating template tree window to the left docking area_.
Choose refresh templates, and you will see the installed templates.
In this example only one macro will be installed (lookup FriCAS API).
$ mkdir ~/.jedit/macros/FriCAS $ cp -v macros/fricas_api.bsh ~/.jedit/macros/FriCAS 'macros/fricas_api.bsh' -> '/home/kfp/.jedit/macros/FriCAS/fricas_api.bsh' Choose ``Macros -> Rescan Macros`` and you should find the folder ``FriCAS`` containing the macro files (bean shell, .bsh) ``fricas_api``:
Add it to the contex menu spad ([+] button)
Add a separator for convenience,
find the Macros menu entry,
and look for fricas_api.
Now press OK.
We want to use it. Mouse-Select a FriCAS Type (e.g. Integer), and
Menu: spad -> fricas_api
should display (in Firefox, otherwise edit the script) the corresponding FriCAS API webpage.
Finally, customize jEdit to your needs, e.g. by arranging the dockable windows and so on.





























