Re: [gedit-list] Gedit for console



2014-06-30 21:49 GMT+09:00 James Freer <jessejazza3 uk gmail com>:
On Mon, 30 Jun 2014, Sébastien Wilmet wrote:

Hi,

On Sat, 2014-06-28 at 23:33 +0100, James Freer wrote:

I love gedit as a prose text editor for a writer in the gui. However, I
also
use the console a lot and was wondering how much altering of code would
be
involved to make gedit a console editor as well.


gedit uses heavily GTK+, which is a graphical widget toolkit, a GTK+
application can not run in the console. To run gedit in a console, an
ncurses interface must be implemented for example, but in this case 90%
of the current code can not be reused…

And the whole point of gedit is to be a graphical text editor…

--
Sébastien


"whole point of gedit is to be a graphical text editor" I wondered if that
was the case.

Again, I am not a developer here, just a lurker, but I have written a
couple of (small) text editors.
I would have been estimating even greater than 90% of the code is
dealing with the graphical environment, and the rest is colored by the
graphical environment. For instance, determining where to break in a
graphical window, you have to know the widths of all the characters on
the line somehow. In a console window, you assume monospaced
characters, so the calculation is simply keeping track of the current
input column and whether you have sensed a word break of some sort.

I find gedit an excellent editor and thought it was worth
mentioning. I'll stay with gedit for gui but started doing much more on the
console now.

What you are seeing is the result of the tendency to re-use tools that
are available that is so prevalent in *nix environments. The
underlying tools provide the depth of functionality that you are
seeing as part of gedit. Those tools are in libraries, and other
applications (like vim, emacs, nano, etc.) expose the tools for a
console environment.

I'll have to stay with emacs-nox - just rather complicated that's all.

You might want to look again at nano, if you really aren't satisfied
with emacs. There are a few other options for various kinds of "wrap"
and for specifying the column to wrap on, etc. I'm pretty sure I've
seen nano wrap a displayed line on word boundaries, according to the
current column width of the console. My memory gets fuzzy quickly
these days, so I may be confused. But there are several options in
play, and your defaults may have set the nowrap flag, which overrides
all the rest (I think), or may have failed to set the fill column (I
think it was), which would nullify the effects of the softwrap flag.

Or are you really talking about paragraph formatting, which I do not
remember being something gedit (which version?) does? That requires
defining a soft-return character, I think, or interpreting CR as such
(in *nix).

I've got to get back to work.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]