I'm using tab+spaces together with 4 char indent as my default settings. Now I have a project with shared code and I must disable tabs. One other developer uses tabs with 4 char width.
So I've used the project settings again. I open the settings from the main menu (Project->Settings) and select the label "Identation" (German "Einrückung"). Here I changed the setup of "Type" from "tabs with spaces" to "spaces".
This doesn't work. Indentation is still done with tabs and spaces.
What is the correct way to use the project related settings?
Sorry. I've forgotten to mention that I am using Geany 1.28 from Debian 8 backports.
Am 16.10.2017 um 10:01 schrieb Joerg Desch:
I'm using tab+spaces together with 4 char indent as my default settings. Now I have a project with shared code and I must disable tabs. One other developer uses tabs with 4 char width.
So I've used the project settings again. I open the settings from the main menu (Project->Settings) and select the label "Identation" (German "Einrückung"). Here I changed the setup of "Type" from "tabs with spaces" to "spaces".
This doesn't work. Indentation is still done with tabs and spaces.
What is the correct way to use the project related settings?
Have you restarted Geany? Changing indentation settings only applies for newly opened files, i.e. doesn't affect open files.
Best regards.
Am Mon, 16 Oct 2017 10:09:20 +0200 schrieb Thomas Martitz:
Am 16.10.2017 um 10:01 schrieb Joerg Desch:
What is the correct way to use the project related settings?
Have you restarted Geany? Changing indentation settings only applies for newly opened files, i.e. doesn't affect open files.
Yes, but it doesn't work.
On 16 October 2017 at 18:12, Joerg Desch news@jdesch.de wrote:
Am Mon, 16 Oct 2017 10:09:20 +0200 schrieb Thomas Martitz:
Am 16.10.2017 um 10:01 schrieb Joerg Desch:
What is the correct way to use the project related settings?
Have you restarted Geany? Changing indentation settings only applies for newly opened files, i.e. doesn't affect open files.
Yes, but it doesn't work.
Did you close the files? Indentation is a per-file setting while they are open and is stored and restored for files left open.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users
Am Mon, 16 Oct 2017 18:45:52 +1000 schrieb Lex Trotman:
Did you close the files? Indentation is a per-file setting while they are open and is stored and restored for files left open.
Yes and no. I did close the whole session with all opened files.
I've tried the following now:
* I closed all opened files of an project * than I changed the project settings * after that, I restarted Genay which doesn't load any file now * than I opened the files again
This sequence of steps is working!
But, is that really the intended way?
On 2017-10-16 01:01 AM, Joerg Desch wrote:
I'm using tab+spaces together with 4 char indent as my default settings. Now I have a project with shared code and I must disable tabs. One other developer uses tabs with 4 char width.
So I've used the project settings again. I open the settings from the main menu (Project->Settings) and select the label "Identation" (German "Einrückung"). Here I changed the setup of "Type" from "tabs with spaces" to "spaces".
This doesn't work. Indentation is still done with tabs and spaces.
What is the correct way to use the project related settings?
Did you try to use `Project->Apply Default Indentation` on the files?
Regards, Matthew Brush
Am Mon, 16 Oct 2017 02:29:31 -0700 schrieb Matthew Brush:
What is the correct way to use the project related settings?
Did you try to use `Project->Apply Default Indentation` on the files?
No. I've posted my solution (which isn't good IMO) as a reply to Lex's posting.
The term "Apply Default Indentation" sounds like switching to the global settings and not to use the project settings. ;-)
I've tried the menu entry now. Is does the job without reloading the project or the files. But why is there an extra step necessary? If I change the indentation type, this should be applied automagically after closing the dialog, shouldn't it?
Le 16/10/2017 à 03:24, Joerg Desch a écrit :
Am Mon, 16 Oct 2017 02:29:31 -0700 schrieb Matthew Brush:
What is the correct way to use the project related settings?
Did you try to use `Project->Apply Default Indentation` on the files?
No. I've posted my solution (which isn't good IMO) as a reply to Lex's posting.
The term "Apply Default Indentation" sounds like switching to the global settings and not to use the project settings. ;-)
I've tried the menu entry now. Is does the job without reloading the project or the files. But why is there an extra step necessary? If I change the indentation type, this should be applied automagically after closing the dialog, shouldn't it?
Well, yes and no. Because as Lex mentioned, you can have a per-file indentation setting, and we don't want to loose that. So we currently consider the setting to be the value to use for newly opened files, and leave the currently open ones with their current setting, in case it was intentional. The idea is that in most cases you don't change the indentation settings of a project after it has been set up, but might want to change if for odd files in the project. However, for the case you did have, we have a mean of changing the setting for each opened files to the setting value, this "Apply Default Indentation".
I agree that this is not the perfect solution for all cases, but for now it's the one we have that doesn't do something unwanted -- but in your case, doesn't do something wanted. If anybody could come with a better solution that would not have any more false positives, we'd probably be happy to try and implement it (or review a patch ;)).
For now the best idea I would have is merely try and add the info in the project preferences dialog, suggesting to apply the indentation if wanted.
Regards, Colomban
On 2017-10-16 02:25 PM, Colomban Wendling wrote:
Le 16/10/2017 à 03:24, Joerg Desch a écrit :
Am Mon, 16 Oct 2017 02:29:31 -0700 schrieb Matthew Brush:
What is the correct way to use the project related settings?
Did you try to use `Project->Apply Default Indentation` on the files?
No. I've posted my solution (which isn't good IMO) as a reply to Lex's posting.
The term "Apply Default Indentation" sounds like switching to the global settings and not to use the project settings. ;-)
I've tried the menu entry now. Is does the job without reloading the project or the files. But why is there an extra step necessary? If I change the indentation type, this should be applied automagically after closing the dialog, shouldn't it?
Well, yes and no. Because as Lex mentioned, you can have a per-file indentation setting, and we don't want to loose that. So we currently consider the setting to be the value to use for newly opened files, and leave the currently open ones with their current setting, in case it was intentional. The idea is that in most cases you don't change the indentation settings of a project after it has been set up, but might want to change if for odd files in the project. However, for the case you did have, we have a mean of changing the setting for each opened files to the setting value, this "Apply Default Indentation".
I agree that this is not the perfect solution for all cases, but for now it's the one we have that doesn't do something unwanted -- but in your case, doesn't do something wanted. If anybody could come with a better solution that would not have any more false positives, we'd probably be happy to try and implement it (or review a patch ;)).
For now the best idea I would have is merely try and add the info in the project preferences dialog, suggesting to apply the indentation if wanted.
Could also just rename it to "Apply Project Preferences to Open Documents" or something similarly non-confusing so users can easily discover it.
Regards, Matthew Brush
On 17 October 2017 at 09:32, Matthew Brush mbrush@codebrainz.ca wrote:
On 2017-10-16 02:25 PM, Colomban Wendling wrote:
Le 16/10/2017 à 03:24, Joerg Desch a écrit :
Am Mon, 16 Oct 2017 02:29:31 -0700 schrieb Matthew Brush:
What is the correct way to use the project related settings?
Did you try to use `Project->Apply Default Indentation` on the files?
No. I've posted my solution (which isn't good IMO) as a reply to Lex's posting.
The term "Apply Default Indentation" sounds like switching to the global settings and not to use the project settings. ;-)
I've tried the menu entry now. Is does the job without reloading the project or the files. But why is there an extra step necessary? If I change the indentation type, this should be applied automagically after closing the dialog, shouldn't it?
Well, yes and no. Because as Lex mentioned, you can have a per-file indentation setting, and we don't want to loose that. So we currently consider the setting to be the value to use for newly opened files, and leave the currently open ones with their current setting, in case it was intentional. The idea is that in most cases you don't change the indentation settings of a project after it has been set up, but might want to change if for odd files in the project. However, for the case you did have, we have a mean of changing the setting for each opened files to the setting value, this "Apply Default Indentation".
I agree that this is not the perfect solution for all cases, but for now it's the one we have that doesn't do something unwanted -- but in your case, doesn't do something wanted. If anybody could come with a better solution that would not have any more false positives, we'd probably be happy to try and implement it (or review a patch ;)).
For now the best idea I would have is merely try and add the info in the project preferences dialog, suggesting to apply the indentation if wanted.
Could also just rename it to "Apply Project Preferences to Open Documents" or something similarly non-confusing so users can easily discover it.
Its certainly not intuitive having it in the "Project" menu when it also applies the preferences default when there is no project. But there is no "Session" menu so I guess "Project" is not unreasonable.
Maybe what it needs is the message from the Preferences->Editor->indentation tab to be repeated in the projects indentation tab "Note: To apply these settings to all currently open documents, use Project->Apply Default Indentation"
Cheers Lex
Regards, Matthew Brush
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users