4

I use Geany mainly for Python, so I've set Indent Type to Spaces and Indent Width to 4. But when working with HTML, I'd like to use 2 spaces.

Is there any way to tell Geany to automatically switch to 2 spaces when working with HTML documents instead of being changing this manually all the time?

cdonts
  • 9,304
  • 4
  • 46
  • 72

1 Answers1

3

You can set indention by filetype or by project. To configure it via filetype copy the filetypes.filetypename from data folder of your Geany installation into your ~/.config/geany/filedefs folder and change

[indentation]
width=4
type=1

to what you like. Please check manual for details.

To start configuration based on a project, start here.

frlan
  • 6,950
  • 3
  • 31
  • 72
  • Perfect! On Windows, the `filedefs` folders is under `C:/Users/(User)/AppData/Roaming/geany`. Thanks. – cdonts Mar 15 '16 at 22:58