Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a quick indentation setting change in the toolbar #36

Closed
jleclanche opened this issue Jul 27, 2012 · 3 comments
Closed

Add a quick indentation setting change in the toolbar #36

jleclanche opened this issue Jul 27, 2012 · 3 comments

Comments

@jleclanche
Copy link
Contributor

Gedit had that feature I believe. Next to the line ending button in the bottom toolbar, add the same for indent settings. Like this:

[x] Tabs
[ ] Spaces
=Indent=
[ ] 8
[x] 4
[ ] 2
@cessen
Copy link
Contributor

cessen commented Oct 21, 2013

To avoid duplicate work, I'm just dropping a note that I'm currently working on this. It mainly just needs some cleanup and bug fixes (and probably a code review) before submitting a pull request.

@cessen
Copy link
Contributor

cessen commented Oct 24, 2013

I now have a mostly-working version of this on my fork:
https://github.com/cessen/juffed

I don't consider it quite finished yet, but it's feature-complete.

The main changes are:

  • Tabs vs spaces, and the indentation width, are now per-document. The per-document settings can be changed both from the "Format" menu and from a new menu in the status-bar.
  • The Editor-wide settings for tabs vs spaces and indentation width still exist, but are now used as "defaults" rather than enforced. So, for example, when you create a new document or open a document it starts with those indentation settings.
  • There is a new Editor setting called "Auto-detect document indentation". When enabled, JuffEd will attempt to automatically determine the indentation settings for a document when opened based on its content, instead of just using the defaults. This frees the user from having to manually change the indentation settings to match the document (which I, personally, often forget to do when e.g. switching between C and Python files). The algorithm used is quite reliable in my experience, and typically only fails in cases where the indentation style of the document is inconsistent in the first place.

Anyway, there's still some cleanup to be done, mostly to do with the UI. For example, it isn't communicated right now which Editor-wide indentation settings are defaults rather than absolutes. But if people want to give this a spin and report bugs, that would be great. :-)

@cessen
Copy link
Contributor

cessen commented Oct 26, 2013

I now consider this feature "finished", pending any requested changes from Mezomish. I've submitted a pull-request here:
#59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants