Can I reduce "8 spaces per tab" in text window?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Can I reduce "8 spaces per tab" in text window?

vischer
Hello,

When running ImageJ on MacOS with Java 8, a tab in a text window corresponds to 8 spaces, which is not practical for indenting code.

With Java 6, it was 4 spaces.

How can I adjust the spaces per tab?

Norbert
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I reduce "8 spaces per tab" in text window?

ctrueden
Hi Norbert,

If you use ImageJ2's Script Editor [1], you can adjust the tab size in the
Edit > Tab sizes menu.

Regards,
Curtis

[1] https://imagej.net/Script_Editor

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Wed, Jan 25, 2017 at 6:09 AM, Norbert Vischer <[hidden email]>
wrote:

> Hello,
>
> When running ImageJ on MacOS with Java 8, a tab in a text window
> corresponds to 8 spaces, which is not practical for indenting code.
>
> With Java 6, it was 4 spaces.
>
> How can I adjust the spaces per tab?
>
> Norbert
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I reduce "8 spaces per tab" in text window?

Gabriel Landini
In reply to this post by vischer
On Wednesday, 25 January 2017 13:09:51 GMT Norbert Vischer wrote:
> When running ImageJ on MacOS with Java 8, a tab in a text window corresponds
> to 8 spaces, which is not practical for indenting code.
>
> With Java 6, it was 4 spaces.

Hi Norbert,
Under linux, with Java 6, 1 tab equals 8 spaces with the monospaced font.
Without the monospaced font, it is like 17 characters wide (depending on the
characters). I also would welcome 4 spaces.

Cheers
Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Can I reduce "8 spaces per tab" in text window?

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by vischer
> On Jan 25, 2017, at 7:09 AM, Norbert Vischer <[hidden email]> wrote:
>
> Hello,
>
> When running ImageJ on MacOS with Java 8, a tab in a text window corresponds to 8 spaces, which is not practical for indenting code.
>
> With Java 6, it was 4 spaces.
>
> How can I adjust the spaces per tab?

This is a bug in Java 8. The workaround is to use spaces instead of tabs. To make this easier, the latest daily build adds an Edit>Detab command to the text editor, which replaces each tab character with a specified number of spaces. Check “Insert spaces for tabs” in the dialog and the editor will insert spaces when you press the tab key.

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Loading...