Hello,
1. Is it possible to have tab used for indentation, not spaces, but the tab key insert spaces elsewhere? For instance ('->' represents a tab, '.' a space, tabwidth 4):
if true { -> foo.........:= 0 -> foobarbaz...:= 0 -> foobar......:= 0 }
(This is the standard style for Go code, and a oft recommended practice: tabs indent, spaces align.)
2. I use the C lexer for Go, which works fine (except for [*] below). An issue is Geany automatically inserts " *" at start of lines in multiline comments, like:
/* * * * * * * */
(I know this is a common practice in C code, but i don't like it because too noisy for me, and anyway this does not match the Go style guidelines.) How desactivate this feature?
Thank you for your attention, and for this great programming tool, Denis
[*] The only issue: from time to time, and from a given point in file, the folding indicators in margin (+) look like if top-lelvel braced blocks were not ended (there is a vertical bar prolonging the '+'), while in fact they are (else the code would not even compile). When this problem happens, it goes from the first erroneous block to the end of file, as if one block was not closed at all. Bracing in Go is just like in C, except placement of opening braces is enforced at end of line (see example above), so that I don't understand the source of this error. Anyway, this is not a major problem.
On 20 February 2012 22:55, spir denis.spir@gmail.com wrote:
Hello,
- Is it possible to have tab used for indentation, not spaces, but the tab
key insert spaces elsewhere? For instance ('->' represents a tab, '.' a space, tabwidth 4):
if true { -> foo.........:= 0 -> foobarbaz...:= 0 -> foobar......:= 0 }
Afraid not, when its not an indent (ie start of line) tab is, well, just a tab character.
(This is the standard style for Go code, and a oft recommended practice: tabs indent, spaces align.)
Yes, it is common because it will preserve alignment between lines of the same indent level irrespective of tab size, but not between lines of different indent levels.
- I use the C lexer for Go, which works fine (except for [*] below). An
issue is Geany automatically inserts " *" at start of lines in multiline comments, like:
/* * * * * * * */
Preferences->editor->completions->Automatic continuation of multiline comments (RTFM)
Cheers Lex
On 02/20/2012 09:49 PM, Lex Trotman wrote:
On 20 February 2012 22:55, spirdenis.spir@gmail.com wrote:
Hello,
- Is it possible to have tab used for indentation, not spaces, but the tab
key insert spaces elsewhere? For instance ('->' represents a tab, '.' a space, tabwidth 4):
if true { -> foo.........:= 0 -> foobarbaz...:= 0 -> foobar......:= 0 }
Afraid not, when its not an indent (ie start of line) tab is, well, just a tab character.
Right.
(This is the standard style for Go code, and a oft recommended practice: tabs indent, spaces align.)
Yes, it is common because it will preserve alignment between lines of the same indent level irrespective of tab size, but not between lines of different indent levels.
Yes.
- I use the C lexer for Go, which works fine (except for [*] below). An
issue is Geany automatically inserts " *" at start of lines in multiline comments, like:
/*
- */
Preferences->editor->completions->Automatic continuation of multiline comments (RTFM)
Sh*t! I have have searched for a while but missed it.
Cheers Lex
Thank you, Denis