[Tutor] OT (probably): How to change default tab key value to 4 spaces in GNOME Terminal?

boB Stepp robertvstepp at gmail.com
Sun Apr 26 15:17:58 EDT 2020


On Sun, Apr 26, 2020 at 1:21 AM Alan Gauld via Tutor <tutor at python.org> wrote:
>
> On 26/04/2020 05:10, boB Stepp wrote:
>
> >
> > After some searching online the best advice I could find was to enter
> > at the command prompt "tabs -4".  I tried this and as far as I can
> > tell it did not work for me while in the Python interpreter.
>
> tab behaviour is highly problematical within terminals and programs.
> You may find that changing your terminal emulator works as expected.
> I seem to recall you use Solaris? ...

Alan, I only use Solaris at work.  I use Linux Mint at home.  And I
use Windows when I have to in both locations.

> But many apps, especially those using curses will have their own tab
> behaviour too. (vim is a classic example that ignores/overrides the
> terminal settings)

I vaguely was aware of this, but until this thread developed I had not
realized how much about the terminal that I used to be at least aware
of I had forgotten.  Of course I know about Vim/vi because I use that
all the time.

> This is one reason I never use tabs for formatting code!

I normally in applications have <tab> expand to (usually 4) spaces.
But in the interpreter run from the shell I had not given any thought
to tabs other than they were annoyingly shifting by 8 columns.  So I
am curious.  Do you normally in the interpreter manually hit the space
bar 4 times instead of <tab>?


--
boB


More information about the Tutor mailing list