Joe's own editor - how to change the tab size
I've wasted about 20 mins trying to set tab size too. Here is the solution:
I. Open:
/etc/joe/joerc
II. Find row containing -tab nnn and change it to:
-tab 4
(I assume that you want to change tab size to 4. If you want different value, please replace all the 4s with your value)
III. Find -istep nnn and change it to:
-istep 4
IV. Save & exit
This will set tab size 4 for files WITHOUT extension. If you want to change tab size for files with common extensions like *.java:
I. open /etc/joe/ftyperc
II. Find your extension, for example *.java. Initially it looks like:
JAVA
*.java
-autoindent
-syntax java
-smarthome
-smartbacks
-purify
-cpara >#!;*/%
III. You have to comment (insert tab before it) -autoindent and add -istep 4 bellow -cpara. It should look like:
JAVA
*.java
-autoindent
-syntax java
-smarthome
-smartbacks
-purify
-cpara >#!;*/%
-istep 4
The real solution is:
- Create a file
$HOME/.joerc
(NOT.joe
as at least the Debianjoerc
suggests!) - FIRST LINE must be
:include /etc/joe/joerc
- Then, a line containing just a
*
and a newline character - Then,
-tab 4
and-istep 4
, each on a single line. - Add a blank line at the end.
You may also add further options with other masks.
In case anyone else runs into this, I am running an ancient version of joe on AIX and after some painful trial and error it turned out that -smartbacks was the problem for me. I commented that line out and tabs work, put it back and they go back to 2. Probably fixed in a later version, but hopefully this helps someone else with the same problem.
JAVA
*.java
-spaces
-tab 4
-istep 4
-indentc 32
-autoindent
-syntax java
-smarthome
-smartbacks
-purify