LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Joe Editor Question (https://www.linuxquestions.org/questions/linux-newbie-8/joe-editor-question-844112/)

st0rmchaser 11-13-2010 06:20 PM

Joe Editor Question
 
Greetings,

I'm not a newbie to Linux, but I'm a newbie to LQ. I've searched the internet for an answer to an issue I'm having with JOE, to no avail.

For my editing purposes, I HATE word wrap. I've read the man page extensively and nothing I try works.

To disable word wrap, it says, simply edit the joerc file and place --wordrap in the first column. Done. It works for .pl, and it works for .c (seems to be built in for C). Bottom line, I cannot disable word wrap for all text files, or at least the ones I want to edit. Has anyone solved this?

Thanks.

Simon Bridge 11-14-2010 03:04 AM

your symptoms are the default behavior. any files than has .c .h or .p suffix will have wordwrap disabled.

wordwrap can be dynamically toggled with ctrl-T W

putting --wordwrap globally should have cleared the option - you are right. have you tried invoking it on the CLI?

Put:

*
--wordwrap

in the second section.

you want to be sure that your options are not overwritten by subsequent entries.

st0rmchaser 11-14-2010 09:54 AM

joe --wordrwap
 
Invoking ^Tw has always worked but is a nuisance.

*
--wordwrap

... really should be working! I have no idea why the thing has gone brain dead. Hopefully Joe is aware of this and would issue a patch, but I did install the latest version just to make sure he hadn't already. He hadn't.

Invoking --wordwrap from the command line is what I'm doing now with the help of a one-line script.

Thanks...

vwal 01-07-2017 03:41 AM

The solution here!
 
Old thread, but if someone stumbles across this (like I did).. I also have used an alias for a long time to disable wordwrap, like so:

Code:

joe() { /usr/bin/joe --linums --wordwrap -nonotice -backpath ~/edit-cache/ "$@" }
But.. it only disables the wordwrap for the first file; if I were to add "--wordwrap" in front of every file as a "local option" it would work, but how to separate the "global-options" from the "local-options" of the first filename, as the man page points out:

Code:

joe [global-options] [ [local-options] filename ]...
But, alas, that was not necessary. I found the answer on Joe's support forums:

Quote:

Find ftyperc. It should be in the same place as the installed joerc. "mkdir $HOME/.joe" . Copy ftyperc to "$HOME/.joe" . Edit it and remove any offending "-wordwrap"s.
And indeed, on my Ubuntu system in /etc/joe/ there is ftyperc file. Once I added a space in front of all of the occurrences of -wordwrap in that file (hence commenting them out per Joe's conf file format), all files now have the wordwrap disabled by default (previously only the first file had the wordwrap disabled per my alias)! This system is a single-user system, so I edited /etc/joe/ftyperc file directly, but on multi-user systems you may want to follow the suggestion to copy the ftyperc file to your home directory, and make the overrides to comment out/delete -wordwrap occurrences out there.

cdtelting 06-10-2023 09:08 AM

I believe what is happening is a mistake in the default ftyperc file

The filename globs are processed sequentially. Anything that matches after a previous match overwrites options.

[not_text] happens after [text]

so *.* overwites the previous *.txt since it matches again

The solution is to reorder/rewrite the sections.


All times are GMT -5. The time now is 04:57 PM.