Hard-wrapping graphical editor

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
User avatar
ganamant
Level 4
Level 4
Posts: 383
Joined: Sun Mar 29, 2015 4:08 pm

Hard-wrapping graphical editor

Post by ganamant » Thu Feb 04, 2016 6:50 am

Hi folks! Can you recommend a GUI-based editor that will hard-wrap lines? I know I can do this in emacs, vim or nano, but I'm looking for something more like gedit or medit. I also know that gedit can be hacked to do hard wrap through the fmt command, but that tends to mess up with whitespace.

What I need is an editor like claws mail's internal editor, that will hard-wrap lines for me without intervention. I'm running Cinnamon, so I'm fine with a few Gnome-ish dependencies, but not with KDE.

User avatar
xenopeek
Level 24
Level 24
Posts: 24018
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Hard-wrapping graphical editor

Post by xenopeek » Thu Feb 04, 2016 9:36 am

Hard to find info on this with Google. I did see Kate (KDE's default text editor) supports static word wrap which looks to do what you want. You can install Kate on Cinnamon though it will pull in a lot of KDE libraries.
Image

User avatar
ganamant
Level 4
Level 4
Posts: 383
Joined: Sun Mar 29, 2015 4:08 pm

Re: Hard-wrapping graphical editor

Post by ganamant » Thu Feb 04, 2016 10:23 am

Yes, kate is great, but it would drag along half a gigabyte of KDE stuff, so I'd rather skip it. In the meanwhile, I've found out that jedit comes close to what I want, but the implementation is quite crude and the font aliasing is terrible, even with anti-aliasing turned on. So, I'm still stuck with

Code: Select all

nano --fill=72 filename
which is less than ideal for me.

Cosmo.
Level 23
Level 23
Posts: 17827
Joined: Sat Dec 06, 2014 7:34 am

Re: Hard-wrapping graphical editor

Post by Cosmo. » Thu Feb 04, 2016 10:27 am

You could do what you want with LO Writer.

User avatar
richyrich
Level 19
Level 19
Posts: 9075
Joined: Mon May 04, 2009 8:31 pm

Re: Hard-wrapping graphical editor

Post by richyrich » Thu Feb 04, 2016 10:48 am

I haven't tried this new text/code editor, but it has what you want . .
Atom also has built in functionality to re-flow a paragraph to hard-wrap at a given maximum line length. You can format the current selection to have lines no longer than 80 (or whatever number editor.preferredLineLength is set to)
The deb file download is right on the page. (seems it is only available for 64bit)
Ref: https://atom.io/

User avatar
ganamant
Level 4
Level 4
Posts: 383
Joined: Sun Mar 29, 2015 4:08 pm

Re: Hard-wrapping graphical editor

Post by ganamant » Thu Feb 04, 2016 4:36 pm

Thanks for the suggestion, but atom is a monster. It's more like a bloated IDE than an editor, but what has annoyed me the most is that by default it reports statistics about the program's use to Google, unless you opt out. They claim to do so anonymously, but it still makes me uncomfortable.

200 MB of space and launching it takes forever. Did I mention it is bloatware? Maybe there's a reason why it's not in the repos, after all.

Habitual
Level 13
Level 13
Posts: 4870
Joined: Sun Nov 21, 2010 8:31 pm
Location: 0.0.0.0

Re: Hard-wrapping graphical editor

Post by Habitual » Thu Feb 04, 2016 4:51 pm

Sublime_Text2

User avatar
LinuxJim
Level 5
Level 5
Posts: 659
Joined: Tue Jan 26, 2016 8:01 pm
Location: Oregon, USA

Re: Hard-wrapping graphical editor

Post by LinuxJim » Thu Feb 04, 2016 5:20 pm

ganamant wrote: I know I can do this in emacs, vim or nano, but I'm looking for something more like gedit or medit.
So what's wrong with the gui version of emacs?

User avatar
ganamant
Level 4
Level 4
Posts: 383
Joined: Sun Mar 29, 2015 4:08 pm

Re: Hard-wrapping graphical editor

Post by ganamant » Fri Feb 05, 2016 3:14 pm

LinuxJim wrote:
ganamant wrote: I know I can do this in emacs, vim or nano, but I'm looking for something more like gedit or medit.
So what's wrong with the gui version of emacs?
I didn't find this option on the menus, just the option to soft-wrap at the window border. I don't want to learn another set of key bindings: at this point, I would use vim instead.

DavePlummer
Level 1
Level 1
Posts: 35
Joined: Sun Jul 01, 2012 10:44 am

Re: Hard-wrapping graphical editor

Post by DavePlummer » Fri Feb 05, 2016 5:25 pm

Two alternatives, both available in repositories:
a. gedit with Join/Split Lines plugin from package gedit-plugins
b. geany

Hope this helps.

User avatar
phd21
Level 19
Level 19
Posts: 9016
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

Re: Hard-wrapping graphical editor

Post by phd21 » Sat Feb 06, 2016 12:11 am

Hi "ganamant",

I second (+1) the use of the incredible "Kate" editor for this, and with hard drive space as large is it is now, who cares if it brings some KDE file dependencies, even if it was a gigabyte worth of files, if it does what you need, or want to do, well? And, then there are some other wonderful, high quality, KDE applications you could also run.

IMHO ...

Hope this helps ...
Phd21: Mint KDE 18.3 & 19, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,4gb Ram,256gb SDD, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

User avatar
LinuxJim
Level 5
Level 5
Posts: 659
Joined: Tue Jan 26, 2016 8:01 pm
Location: Oregon, USA

Re: Hard-wrapping graphical editor

Post by LinuxJim » Sat Feb 06, 2016 12:28 am

ganamant wrote:
LinuxJim wrote:
ganamant wrote: I know I can do this in emacs, vim or nano, but I'm looking for something more like gedit or medit.
So what's wrong with the gui version of emacs?
I didn't find this option on the menus, just the option to soft-wrap at the window border. I don't want to learn another set of key bindings: at this point, I would use vim instead.

You just said you could do it in emacs. The gui version of emacs is the same editor! Seems you are just impossible to please...

User avatar
ganamant
Level 4
Level 4
Posts: 383
Joined: Sun Mar 29, 2015 4:08 pm

Re: Hard-wrapping graphical editor

Post by ganamant » Sat Feb 06, 2016 3:38 am

LinuxJim wrote: You just said you could do it in emacs. The gui version of emacs is the same editor! Seems you are just impossible to please...
Yes, yes, I did say I can do that, but with a cheat sheet in front of me, that is. I can also do it in nano and vim via command-line options or config files, I said that too. And for that matter, there is also gvim
out there.

These programs, however, are cli-based editors with a frontend, and their graphical performance, especially font rendering, is usually poor. It's the same reason why I dislike jedit, despite it's rich configuration options. My eyes tire easily in front of a monitor, and they are quite sensitive to aliasing; so, I'd rather use the cli editor from within the gnome terminal than a frontend like gui emacs or gvim. But then, I can't use a mouse.

User avatar
xenopeek
Level 24
Level 24
Posts: 24018
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Hard-wrapping graphical editor

Post by xenopeek » Sat Feb 06, 2016 4:10 am

I have an alias for nano to start it as "nano -Sm". -S is to do smooth scrolling (line by line instead of by half pages) and -m is to enable mouse support. As per the manpage:
Enable mouse support, if available for your system. When enabled, mouse clicks can be used to place the cursor, set the mark (with a double click), and execute shortcuts. The mouse will work in the X Window System [...]. Text can still be selected through dragging by holding down the Shift key.
Perhaps that can work for you or the other console editors have a similar option.
Image

Post Reply

Return to “Software & Applications”