Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-08

Block indent config

16 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jürgen Hestermann

I have struggled with this already multiple times but it strikes me again and again:

After installing a fresh Lazarus build (I think that's the cause) suddenly Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I configured long ago). That makes it impossible to correct odd to even columns and vice versa.

But even desperate searching through the options does not help because all settings that I see are set to 1 (tab/spaces). Can someone point me to the correct setting?
Thanks.

BTW: Why is the default setting for this other than 1? It is very easy to indent by more than 1 by typing Ctrl+I/U multiple times but it's a pain when having it set to 2 or more because then you cannot have 1 directly but have to fight with the settings.

Reply by email

Martin
to Jürgen Hestermann
J?rgen Hestermann wrote 9 lines
I have struggled with this already multiple times but it strikes me again and again: After installing a fresh Lazarus build (I think that's the cause) suddenly Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I configured long ago). That makes it impossible to correct odd to even columns and vice versa.

http://imagebin.org/223650

This is what you should have (the 2 fields in red)

If it does not work, please send your EditorOptions.xml

Reply by email

Martin
to Martin
Martin wrote 16 lines
On 07/08/2012 16:12, J?rgen Hestermann wrote: > I have struggled with this already multiple times but it strikes me > again and again: > > After installing a fresh Lazarus build (I think that's the cause) > suddenly > Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I > configured long ago). That makes it impossible to correct odd to > even columns and vice versa. > http://imagebin.org/223650 This is what you should have (the 2 fields in red) If it does not work, please send your EditorOptions.xml

actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero)

Reply by email

Jürgen Hestermann
to Martin: http://imagebin.org/223650 This is what you should have (the 2 fields in red) If it does…
Martin wrote 16 lines
On 07/08/2012 16:12, J?rgen Hestermann wrote: > I have struggled with this already multiple times but it strikes me again and again: > > After installing a fresh Lazarus build (I think that's the cause) suddenly > Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I > configured long ago). That makes it impossible to correct odd to > even columns and vice versa. > http://imagebin.org/223650 This is what you should have (the 2 fields in red) If it does not work, please send your EditorOptions.xml

This is set to 1 in my settings.
But it is also not selected (as I don't want TAB to indent blocks). EditorOptions.xml is attached (but I did not find any item set to 2 in this file). -------------- next part --------------
A non-text attachment was scrubbed...
Name: editoroptions.xml
Type: text/xml
Size: 1837 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120807/dbaa297f/attachment.xml>

Reply by email

Jürgen Hestermann
to Martin: actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero)
Martin wrote 19 lines
On 07/08/2012 16:22, Martin wrote: > On 07/08/2012 16:12, J?rgen Hestermann wrote: >> I have struggled with this already multiple times but it strikes me again and again: >> >> After installing a fresh Lazarus build (I think that's the cause) suddenly >> Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I >> configured long ago). That makes it impossible to correct odd to >> even columns and vice versa. >> > > http://imagebin.org/223650 > > This is what you should have (the 2 fields in red) > > If it does not work, please send your EditorOptions.xml actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero)

Why this? It seems very illogical.
Especially, because this option is unchecked.

Reply by email

Graeme Geldenhuys
to Jürgen Hestermann
J?rgen Hestermann wrote 5 lines
> actually, include to the right the drop down "Block indent (tabs)" must be > 0 (zero) > > Why this? It seems very illogical.

Because his sample screenshot enables the TAB key to do block indentation. If you what TAB characters inserted in your source code (like I prefer), then the "Block indent (tabs)" must have a value, and the "Block indent (spaces)" must have 0. If you prefer SPACE characters to be inserted for indentation, then the values must be other way round.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Jürgen Hestermann
to Martin: actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero)
Martin wrote 17 lines
On 07/08/2012 16:22, Martin wrote: > On 07/08/2012 16:12, J?rgen Hestermann wrote: >> I have struggled with this already multiple times but it strikes me again and again: >> >> After installing a fresh Lazarus build (I think that's the cause) suddenly >> Ctrl+I (indent block) moves the block by 2 columns instead of 1 (which I >> configured long ago). That makes it impossible to correct odd to >> even columns and vice versa. >> > > http://imagebin.org/223650 > > This is what you should have (the 2 fields in red) > > If it does not work, please send your EditorOptions.xml actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero)

Yes, that was the root cause.
But I would consider this a bug.
If I have not checked the "Tab indents blocks" field why do these settings influence the behaviour of Ctrl+I/U?

Reply by email

Martin
to Jürgen Hestermann
J?rgen Hestermann wrote 8 lines
> actually, include to the right the drop down "Block indent (tabs)" > must be 0 (zero) Yes, that was the root cause. But I would consider this a bug. If I have not checked the "Tab indents blocks" field why do these settings influence the behaviour of Ctrl+I/U?

The 2 drop downs configure the indent that is triggered by the function.

The check box configures if [tab] should trigger the function (or if only ctrl-i)

Indenting with tab, or ctrl-i can indent the selection using spaces or using tab-characters

Reply by email

Jürgen Hestermann
to Martin
Martin wrote 13 lines
On 07/08/2012 16:49, J?rgen Hestermann wrote: > >> actually, include to the right the drop down "Block indent (tabs)" must be 0 (zero) > > Yes, that was the root cause. > But I would consider this a bug. > If I have not checked the "Tab indents blocks" field > why do these settings influence the behaviour of Ctrl+I/U? The 2 drop downs configure the indent that is triggered by the function. The check box configures if [tab] should trigger the function (or if only ctrl-i) Indenting with tab, or ctrl-i can indent the selection using spaces or using tab-characters

That's extremly confusing.
If "Tab indents blocks" is unchecked I do not expect the 2 following settings having any effect. At least a hint is needed that says that these settings still apply for Ctrl+I/U.

And why do these setting change after each install? I am changing it often but it keeps coming back.
And the settings are not easy to find because
1.) the split into spaces and tabs shows no expected number 2 (instead it is 1 space + 1 tab) 2.) I don't pay much attention because I expect these settings to have no meaning anyway when "Tab indents blocks" is unchecked

Reply by email

Martin
to Jürgen Hestermann
J?rgen Hestermann wrote 24 lines
Am 2012-08-07 17:52, schrieb Martin: > > The 2 drop downs configure the indent that is triggered by the function. > The check box configures if [tab] should trigger the function (or if > only ctrl-i) > Indenting with tab, or ctrl-i can indent the selection using spaces > or using tab-characters > That's extremly confusing. If "Tab indents blocks" is unchecked I do not expect the 2 following settings having any effect. At least a hint is needed that says that these settings still apply for Ctrl+I/U. And why do these setting change after each install? I am changing it often but it keeps coming back. And the settings are not easy to find because 1.) the split into spaces and tabs shows no expected number 2 (instead it is 1 space + 1 tab) 2.) I don't pay much attention because I expect these settings to have no meaning anyway when "Tab indents blocks" is unchecked

Were do you expect the config for the ctrl-i indent to come from?

This section is "Tab and indent" so it is not tab only....

I updated the help
http://wiki.lazarus.freepascal.org/IDE_Window:_Editor_Options_General#Indent_and_Tabs

Reply by email

Jürgen Hestermann
to Martin
Martin wrote
Were do you expect the config for the ctrl-i indent to come from?

I don't know. There are so many settings all over the config window. If none is clearly showing that it has to do with Ctrl+I/U then I don't know it. And it's especially confusing when I see that Ctrl+I/U indents by 2 columns but none of the setting is set to 2.

If "Tab indents blocks" is a setting independent from the two following numbers then it should not prepend it. This looks as if these settings only apply if "Tab indents blocks" is checked.

I would move the "Tab indents blocks" below the two settings because otherwise these two settings "Block indent (spaces)" and "Block indent (tabs)" suggest that they are related to "Tab indents blocks".

Also, I would use a common heading for both settings and would put both to the left as in: --------------------------------------------------------------------- The block indent function (Ctrl+I/U) adds/removes the following: [] space(s) plus
[] tab(s)

[] Tab indents blocks too
---------------------------------------------------------------------

Having the second config so far to the right looks as if has nothing to do with the left side. It looks more as if all settings are put in two columns.

Reply by email

Martin
to Jürgen Hestermann
J?rgen Hestermann wrote 8 lines
Am 2012-08-07 18:08, schrieb Martin: > Were do you expect the config for the ctrl-i indent to come from? I don't know. There are so many settings all over the config window. If none is clearly showing that it has to do with Ctrl+I/U then I don't know it. And it's especially confusing when I see that Ctrl+I/U indents by 2 columns

It would be nice to show the key combo, yes. But it needs to be done dynamically as it may change. There could also be a link to set the combo....

You may wihs to add that as a reminder to mantis (as I am not going to do it now...)

but none of the setting is set to 2.

Maybe worth showing the tabs including the translated width? But that may be confusing too.
1 (equals 2 spaces)
2 (equals 4 spaces)
3 (equals 6 spaces)

Show quoted text 5 lines
If "Tab indents blocks" is a setting independent from the two following numbers then it should not prepend it. This looks as if these settings only apply if "Tab indents blocks" is checked.

Well they are not independend. But they are not sub-settings either

Show quoted text 8 lines
I would move the "Tab indents blocks" below the two settings because otherwise these two settings "Block indent (spaces)" and "Block indent (tabs)" suggest that they are related to "Tab indents blocks". Also, I would use a common heading for both settings and would put both to the left as in:

I'll need to see how much space there is. Moving them to a new page would irritate even more people (because eweryone who knows them, expects them there)

Having the second config so far to the right looks as if has nothing to do with the left side. It looks more as if all settings are put in two columns.

Yes, there are 2 columns.
And the space must be there, because translations may need it

Reply by email

Martin
to Martin
Martin wrote 12 lines
> > I would move the "Tab indents blocks" below the two settings because > otherwise these two > settings "Block indent (spaces)" and "Block indent (tabs)" suggest > that they are related to "Tab indents blocks". > > Also, I would use a common heading for both settings and would put > both to the left as in: I'll need to see how much space there is. Moving them to a new page would irritate even more people (because eweryone who knows them, expects them there)

Well it might be possible to move the entire "Tabs and Indent" to a page of their own, and show them as a node it the tree.

Then the space for a better layout with 3 sections ( Tabs / auto indent / block indent ) and a link to the keymap) would be there.....

Patches welcome

Reply by email

Jürgen Hestermann
to Martin: It would be nice to show the key combo, yes. But it needs to be done dynamically as it…
Martin wrote
> If none is clearly showing that it has to do with Ctrl+I/U then I don't know it. > And it's especially confusing when I see that Ctrl+I/U indents by 2 columns It would be nice to show the key combo, yes. But it needs to be done dynamically as it may change. There could also be a link to set the combo....

Yes, showing the key sequence would be best (if it can be retrieved dynamically when building the config window). But what confused me was that the settings only talked about TAB doing the indent. It looked as if the whole settings only apply to the TAB key and if unchecked, they are irrelevant. What I missed was some information that these settings are for all "Block indent functions".

Show quoted text 5 lines
> but none of the setting is set to 2. Maybe worth showing the tabs including the translated width? But that may be confusing too. 1 (equals 2 spaces) 2 (equals 4 spaces) 3 (equals 6 spaces)

Is it realy necessary to have two options (spaces and tabs) here? This is completely unexpected at this point.
I think nobody would want to add spaces *and* tabs (as it happened for me unintentionally). Wouldn't it be better to have only one number and an addional selector for the unit (space or tab)? Example:
--------------------------------------------
Space added by each call of the block indent function: [3] [space(s)/tab(s)]

[x] The TAB-key indents text block too
--------------------------------------------
There would be only one number and this could be configured to be spaces or tabs. Also, the word "too" in the last line would clarify that these settings are not for the TAB key only.

I'll need to see how much space there is. Moving them to a new page would irritate even more people (because eweryone who knows them, expects them there)

There is plenty of space available and with my suggestion from above only one additional line would be needed.

> Having the second config so far to the right looks as if has nothing to do with the left side. > It looks more as if all settings are put in two columns. Yes, there are 2 columns. And the space must be there, because translations may need it

Other settings that have the same 2 column format are different in that the settings on the right have no (direct) relation to what is on the left. It's more a 2 column presentation of what would have been in one column otherwise (like a newspaper and not like a spreadsheet).

Reply by email

Martin
to Jürgen Hestermann
J?rgen Hestermann wrote 17 lines
Am 2012-08-07 20:03, schrieb Martin: >> If none is clearly showing that it has to do with Ctrl+I/U then I don't know it. >> And it's especially confusing when I see that Ctrl+I/U indents by 2 columns > It would be nice to show the key combo, yes. But it needs to be done dynamically as it may change. There could also be a link to set the combo.... Yes, showing the key sequence would be best (if it can be retrieved dynamically when building the config window). But what confused me was that the settings only talked about TAB doing the indent. It looked as if the whole settings only apply to the TAB key and if unchecked, they are irrelevant. What I missed was some information that these settings are for all "Block indent functions".

I guess the issue is that "tab" can mean the key or the char. If you have better terminology... (see comments on space below)

The problem, if even worse, on other places as tab also is used in notebook-context

Show quoted text 11 lines
>> but none of the setting is set to 2. > Maybe worth showing the tabs including the translated width? But that may be confusing too. Is it realy necessary to have two options (spaces and tabs) here? This is completely unexpected at this point. I think nobody would want to add spaces *and* tabs (as it happened for me unintentionally). Wouldn't it be better to have only one number and an addional selector for the unit (space or tab)?

Probably. But the only way to find out for sure, is to remove it and wait for complains (and then add it again)

I don't plan on doing that.

Show quoted text 7 lines
[x] The TAB-key indents text block too -------------------------------------------- There would be only one number and this could be configured to be spaces or tabs. Also, the word "too" in the last line would clarify that these settings are not for the TAB key only.

It is not guaranteed that there is another keycode. It needs more space to be more clear

BTW: without any indication (on this page) what other things do block indent), I find the "too" by far more irritating. (But that is just my opinion)

Show quoted text 7 lines
> I'll need to see how much space there is. Moving them to a new page would irritate even more people (because eweryone who knows them, expects them there) There is plenty of space available and with my suggestion from above only one additional line would be needed.

- You must measure at the minimum size of the dialog. People using laptops may have small screens, so min the size will not be increased.
- Almost all translations are longer, than the English
- there are already issues, because some gtk themes have bigger controls

I agree it could be more clear.
But within the current page, I do not see any acceptable quick fix

I am not sure, if spreading the options on more pages is a better solution (in terms of having to look at even more pages to find what you want). But it would appear to be.

Reply by email

Martin
to Jürgen Hestermann: Yes, showing the key sequence would be best (if it can be retrieved dynamically when…
J?rgen Hestermann wrote 17 lines
Am 2012-08-07 20:03, schrieb Martin: >> If none is clearly showing that it has to do with Ctrl+I/U then I don't know it. >> And it's especially confusing when I see that Ctrl+I/U indents by 2 columns > It would be nice to show the key combo, yes. But it needs to be done dynamically as it may change. There could also be a link to set the combo.... Yes, showing the key sequence would be best (if it can be retrieved dynamically when building the config window). But what confused me was that the settings only talked about TAB doing the indent. It looked as if the whole settings only apply to the TAB key and if unchecked, they are irrelevant. What I missed was some information that these settings are for all "Block indent functions".

I made a bit more space, and changed the layout.

Added some extra info too.

Reply by email