问题
How to 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 TAB are visible.
回答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.
回答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.
回答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".
回答4:
To take effect on opened documents has to go to:
- Document-> indent_type -> spaces.
The document configuration has prevalence over the global.
回答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.
来源:https://stackoverflow.com/questions/5287849/how-to-stay-tab-free-in-geany-on-ubuntu