[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What editor to use in combination with octave?
Re: What editor to use in combination with octave?
Mon, 30 Aug 2010 09:55:56 -0700 (PDT)
Please excuse a long post. I have experimented with a variety of editors and
I find this question interesting.
I also mainly use Gnome under Ubuntu (also OpenSuSE and other distros
including the disappointingly named "Scientific Linux"). I have also used
KDE but I have the prejudice that Gnome consumes fewer resources (and other
desktops consume less but Gnome is a reasonable compromise).
There is a certain tension in selecting a suitable editor. Some are
extremely powerful but, unfortunately, we live in a world in which those who
do *not* work primarily in software development have, in general, (I would
say "for better or for worse" but I am convinced it is "for worse"!)
absorbed certain conventions of the editors that went on to become class
leading word processors. That leaves a burden of expectation of how an
editor will work that conflicts with how the most powerful editors actually
So, the question arises whether to unlearn the expectations that represent
the pollution of the common word processors and to relearn the conventions
of one of the powerful editors, or whether to find an editor that
accommodates those expectations. It is a difficult choice. I do not work in
IT and, whilst I would like to become proficient in a "proper" editor, I
cannot justify the time that it would take. My understanding of the powerful
"proper" editors is therefore made from a position of dabbling rather than
It is worth noting that the Octave handbook (authors: JWE, DB, SH) includes
an appendix that explains how to set up emacs to edit Octave. In a sense,
that appears to make it the "official" choice of development environment (I
would be interested in others comments on this). I understand that it was
written largely by the great Richard Stallman as the first stage for writing
GNU (so that he wrote most of the code underlying GNU using it). As noted by
a previous poster, emacs may become a "way of life". It may be used for many
things including, for example, a LaTeX editor. It is also possible to use it
as a front end for R. I don't know enough about emacs to set up a single
version that will do all of these things so that for example I have tried
TeXmacs for LaTeX and a version modified by someone else for R called "ESS"
("emacs speaks statistics). With regard to Octave, it does allow the
development of several scripts simultaneously (that will interact with each
>From the outside (of software development) looking in, I understand that
there is great (friendly) rivalry in the software development world between
those that use Emacs and those that use Vi (and its successor, Vim). I
understand those that use Vim consider it superior to Emacs and also use it
for "everything" (including, for example, coding LaTeX).
I have tried Emacs and I learned how to "pipe" code in development to a
terminal. I am not sure whether that is a real terminal or a virtual one
controlled (as a daughter process) by Emacs - I note that some other editors
I have used are careful to make this distinction. I expect those proficient
in Emacs will know merely because of their background. I experimented with
Vim (and I downloaded "Imperator" for Firefox to practise its use) but I
never learned how to have several windows open or how to "pipe" code to the
On to the less "macho" options that behave as expected by non-experts!
I have used QtOctave and I admire those trying to develop it but I
encountered many bugs (I have posted here before to explore whether the bugs
lay with QtOctave or Octave). Personally, I would not recommend it at its
current stage of development.
As I used gnome, I have tried "Gedit" and "Geany". These have the more
familiar conventions for editing (marking, cutting, copying etc) text which
means that they are quicker to learn but I know that users of Emacs and Vim
note that they are less flexible. I never worked out how to "pipe" scripts
to the terminal from Gedit but I was able to do this from Geany. There was
an annoying problem with the interpretation of the last line in the program
- I required two returns (I expect that this was something to do with
different conventions in Unix and the other thing which shall not be named,
concerning the distinction between line feed and carriage return - I expect
I would have sorted it out eventually if I had stuck with it).
However, under the advice of a friend, I have installed "Kate" (available
through Ubuntu repositories - it is necessary to install a couple of other
things to make it work in Gnome rather than KDE but it was straightforward).
Of the "conventional" editors I have tried, I found Kate the most useful. I
can "pipe" the scripts easily to a virtual terminal (which is explicitly
identified as a virtual under the default settings - I understand that I
could pipe it to a separate terminal but then I would not be able to
interrupt a script if it wandered off course). Kate does not appear to cause
problems with the last line of the script (I presume because it has
different default conventions for line ends).
All of the "conventional" (non macho) editors appear to have an upper limit
on the size of block of script that may be submitted in one go to the
terminal (I had to split some scripts into two to make them work). This
problem did not appear to exist in Emacs (and I expect this also applies to
Vim). It is possible that I can resize some buffer somewhere but I can't
find a way to do this using the manuals supplied with the various editors).
Anyway, I think the answer is, if you aspire to become a serious coder, and
you have the time, then it would be worth becoming proficient in Emacs or
Vim (particularly if you will be writing very long scripts that would not be
easily split into smaller chunks). It is probably worth making a choice and
learning one in detail rather than trying to master both. If, like me, you
are an occasional coder that does not have time to unlearn old conventions
and relearn new ones, I personally feel that Kate is the best one of this
type and I can confirm that it runs under Gnome. I have encountered one
minor problem - I installed a couple of octave add-on packages ("statistics"
and "miscellaneous" - which is required by statistics) and this yielded
error messages that suggest that the help file did not properly integrate (I
presume that would be a KDE/Gnome thing rather than an Octave thing).
Sorry for the long post but I hope it provokes discussion from which I might
View this message in context:
Sent from the Octave - General mailing list archive at Nabble.com.