On 9/24/07, Catalin Marinas catalin.marinas@gmail.com wrote:
I also prefer Python indentation to use spaces and C indentation to use tabs but geany only supports one setting for all
One workaround is to use different configuration directories with the -c option, but this clearly isn't ideal.
Thanks for this. It is not ideal but it works for now.
Or use the Lua plugin :-)
It provides for a set of scripts in ~/.geany/plugins/lua/events/ that will run each time a file is opened or activated. For my needs, I set up a fairly simple rule:
"Always use spaces, unless it's a makefile, or if it it already contains tabs"
So, my "opened.lua" and "activated.lua" scripts both do this:
geany.scintilla("SetUseTabs", string.match(string.lower(geany.fileinfo().name), "^makefile.*")~=nil or string.find(geany.text(), "\t")~=nil)
This has the advantage that it's not limited to filetypes, content or any other criteria. It allows whatever absurdly complex rules the user's heart desires, use tabs in the morning and spaces in the afternoon, with a tab width of 4 unless the filename begins with a capital letter, then use a tab width of 13, except on Aunt Mable's birthday ;)
- Jeff