What about the attached script? It's developed with FriCAS, but would that work with AXIOM?
For simplicity, instead of axDomain, my script outputs axdomains. That's easily fixable by introducing a third parameter to the keywords shell function. The operations.vim doesn't quite match. There are some places where in your original file you have something like \M~=\m. Since I don't use vim, I don't understand the differences. Hopefully, this script also works for AXIOM and OpenAxiom. Ralf On 11/11/2013 05:53 PM, Fabio S. wrote: >>> I have only one remark: I used axiom to generate >>> categories/domains/packages/operators names. Are them exactly the same >>> in fricas? I don't know this. From this point of view, maybe they can't >>> be completely interchangeable. >> >> If I were you, I would simply write a little script that a user could >> run on his/her machine and generated the respective lists of >> categories/domains/... in a form appropriate for the vim-mode. > > That's a good idea. Done by hand, the procedure is quite simple: > > 1) In axiom: > )set output length 20 > )spool cat.vim > )what cat > )spool > )spool dom.vim > )what dom > )spool > )spool op.vim > )what op > )spool > )spool pack.vim > )what pack > )spool > > 2) clean up top and bottom of every file > > 3) Insert vim syntax: > > sed "s/\(^[a-zA-Z].*$\)/syn keyword axCategories \1/" cat.vim > > categories.vim > sed "s/\(^[a-zA-Z].*$\)/syn keyword axDomain \1/" dom.vim > > domains.vim > sed "s/\(^[a-zA-Z].*$\)/syn keyword axPackages \1/" pack.vim > > packages.vim > sed "s/\(^[a-zA-Z].*$\)/syn keyword axOperation \1/" op.vim | sed > "s/\(^[^s].*$\)/syn match axOperation \"\\\\M\1\\\\m\"/" > operations.vim > > Step 3 is already shell script. > Step 2 can be done if one assumes that the "garbage" in the spool is > always the same: but is this true for all forks of axiom? I don't know. > Maybe in this step you still need to edit files by hand, at least to check > them. > And what about step 1? How can I start axiom with a input file in a shell > script? > > Fabio > > _______________________________________________ > Axiom-developer mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/axiom-developer
keywords.sh
Description: application/shellscript
_______________________________________________ Axiom-developer mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/axiom-developer
