[Geany] tab indents, space aligns support

Nick Treleaven nick.treleaven at xxxxx
Mon May 18 12:18:35 UTC 2009


On Sat, 16 May 2009 02:28:46 +0300
Andris Raugulis <ar at null.lv> wrote:

> > In src/editor.c you might be able to modify insert_indent_after_line(),
> > but there are probably other places that need changes too.
> 
> I'm not pretty familir with Geany's source, but I could try to implement
> it. It will be slow, though. Maybe somebody is willing to work on it and
> it will get implemented faster. Of course, if you're willing to include
> this feature.

I'm working on it now, for at least the common actions that need
changes. I'll post back to the list when there's something to test.

> > I think this is a reasonable request, but Geany would need to add
> > support for it. Perhaps there could be a pref that only works in tabs
> > or spaces indent mode.
> 
> Yeah, it is reasonable, because people do use that style (as you've seen
> in latest discussions on list). It's applicable when writing SQL code,
> commenting or in long conditional statements/expressions and function
> parameters.

Thanks for the info.

> I thought about how to implement it and came to conclusion that pref
> in editor->identation would be the best way. Dunno how it could be

Yes, I think so.

> named, though. How could it work:
> 
> tab:
> 	single line -> insert single tab at cursor
> 	multi line -> insert single tab at the start of line
> 	              (ident always starts at the beginning of line)
> 
> shift+tab:
> 	single line -> (already works fine, removing tab at cursor)
> 	multi line -> remove tab from beginning of the line
> 
> I think that would cover it, won't it? Or I've made some flaws?

I think that should work.

Regards,
Nick



More information about the Users mailing list