How can I stay tab-free in Geany on Ubuntu?

24,042

Solution 1

You are looking for 'soft tabs'

http://www.geany.org/manual/dev/index.html#editor-indentation-preferences

Edit > Preferences > Editor > Indentation > Type > Spaces

After changing the setting, close and reopen the file.

To apply the tab settings to every document in the current session, also click:
Project->Apply Default.

Solution 2

DTing is right but on thing to remember: You have to close all files (tabs) in Geany and open them up again to have the new settings work in each file. It took me days to figure out that I not only have to close geany and open it up again but that I also have to re-open each file seperately.

Solution 3

I know I'm a bit late on this, but hopefully this answer might help someone else. With Geany closed, edit ~/.config/geany/geany.conf with some other editor, changing the lines:

use_tab_to_indent=true
indent_type=1

to:

use_tab_to_indent=false
indent_type=0

and the settings will "take".

Solution 4

To take effect on opened documents has to go to:

  • Document-> indent_type -> spaces.

The document configuration has prevalence over the global.

Solution 5

Here's another tip I like that works in almost any editor. Enable view whitespace, and never get confused again about what's in the file:

Preferences > Editor > Display > ✔ Show Whitespace

Then restart Geany.

I use the the syntax highlighting features to make these symbols very subtle, a low contrast greyscale, so one has to look to see them. The tab is still somewhat easy to see in scintilla editors because it it will be a multi-character long arrow.

Share:
24,042

Related videos on Youtube

Josh Morrison
Author by

Josh Morrison

Updated on July 26, 2020

Comments

  • Josh Morrison
    Josh Morrison almost 4 years

    How can I stay tab free in Geany on Ubuntu?

    When I am coding in Python, tabs have always annoyed me. And the TAB is invisible. So strange.

    When I open my code by gedit, those TABs are visible.

  • Dave Jarvis
    Dave Jarvis almost 11 years
    After changing the setting, close and reopen the file as Martin notes.
  • berbt
    berbt about 9 years
    Thanks @DaveJarvis. Restarting Geany wasn't enough.
  • Derek Foulk
    Derek Foulk about 9 years
    I tried everything else recommended (Using the 'Preferences > Editor > Indent' settings, then 'Project > Apply Default Indentation'), but this is what it took to actually have those settings apply. The settings did not work in a project file or otherwise. Thank you!
  • Ubuntourist
    Ubuntourist over 8 years
    While setting the preferences changed that file containing the global configuration for me automatically, it didn't change some of the Project configurations, which are stored in a [project_name].geany file containing a localized copy of some of those global configurations to be applied to a limited set of files.
  • Cyan
    Cyan over 8 years
    Mmmmh, it seems that doesn't work. It continues to generate tabs even though this "space" checkbox is set. Either this functionality is buggy or improperly described (tested with geany 1.23.1)
  • Lori
    Lori about 8 years
    I guess that's why they call it Geany. Your wish is its command, but you have to be very careful and precise about how you express your wish.
  • Gabriel Staples
    Gabriel Staples over 6 years
    @Cyan, after making the change, you must then enforce it by going to "Project --> Apply Default Indentation." Took me a few minutes to figure this out too.
  • Gabriel Staples
    Gabriel Staples over 6 years
    Alternatively, after making the change, you must then enforce it by going to "Project --> Apply Default Indentation." Took me a few minutes to figure this out too.
  • HongboZhu
    HongboZhu over 5 years
    Close all tabs if you have more than one. In such cases, reopening the file in the active tab does not help. Closing Geany does not replace closing all tabs. Also, do "Project -> Apply Default Indentation" does not exclude you from reopening all tabs!
  • Telmo Marques
    Telmo Marques over 5 years
    Keyword here is "close the file". Not geany, the file tab. For a minute I though the setting didn't work.