Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Indent-guess isn't working correctly after switching between spaces and tabs #4054

Closed

Description

@alexandernst

Auto-guessing indent isn't working correctly after changing between spaces and tabs indent style.

Please see video: http://youtu.be/IP11Y8H2Q70

Activity

  1. changed the title [-]Indent-guess isn't working correctly after changing between spaces and tabs[/-] [+]Indent-guess isn't working correctly after switching between spaces and tabs[/+] on Nov 4, 2014
  2. benogle commented on Nov 4, 2014

    @benogle
    Contributor

    A recap of the steps

    • open a file with hard tabs, tab type detected as hard tabs
    • run whitespace:convert-tabs-to-spaces
    • tab type still set to as hard tabs

    We will be able to do this once #3719 is in.

  3. alexandernst commented on Nov 4, 2014

    @alexandernst
    Author

    @benogle Good to know you're aware of the bug. Do you plan to fix #3719 (and maybe this bug too?) before 1.0?

  4. benogle commented on Nov 4, 2014

    @benogle
    Contributor

    Yeah, for sure #3719 before 1.0.

  5. alexandernst commented on Aug 14, 2015

    @alexandernst
    Author

    @benogle Now that #3719 got fixed, can we get this one?

  6. alexandernst commented on Oct 28, 2015

    @alexandernst
    Author

    Still happening with 1.0.19

  7. alexandernst commented on Jan 10, 2016

    @alexandernst
    Author

    Still happening with 1.3.2
    This was supposed to be fixed before 1.0, or shortly after. What is the problem? Is there some other issue that must be fixed before this one?

  8. alexandernst commented on Feb 7, 2016

    @alexandernst
    Author

    Still happening with Atom 1.4 stable and 1.5.0 beta

  9. winstliu commented on Feb 7, 2016

    @winstliu
    Contributor

    Retagging to bug since it seems more like a bug than a feature.

  10. alexandernst commented on Apr 14, 2016

    @alexandernst
    Author

    Still happening with Atom 1.7

  11. sandrodz commented on May 16, 2016

    @sandrodz

    yep still here.

  12. jeffmcneill commented on Jun 13, 2016

    @jeffmcneill

    Most reports of issues seem to be closed without resolving the underlying problem. There is only one open I could find (on cursory clicking):

    Closed

    Open

    The big issue as reported is the inaccurate "guessing" combined with the inability for an editor-wide setting (and not per-file setting). It may be that several preferences may be required instead of having one monolithic setting which is clearly causing unhappiness:

    • Default for all files (y/n)
    • Default for certain files (by file extension)
    • Setting on per file basis

    The idea would be to be able to re-order these in terms of priority, based on the needs of the user.

  13. sandrodz commented on Jun 13, 2016

    @sandrodz

    @jeffmcneill

    It may be that several preferences may be required instead of having one monolithic setting which is clearly causing unhappiness

    well we have editorconfig for that don't we? I don't want atom taking on the functionality of editorconfig. But I'd love it to guess better and play nicely with editorconfig settings.

  14. pdf commented on Oct 3, 2016

    @pdf

    Since issues related to soft-/hard-tabs seem to get closed without the root problem being fixed, I'll just add comments here rather than create a new issue, or commenting on one of the closed issues, even though the comments are slightly tangential to the original issue.

    Auto-detection of indentation is certainly desirable, especially if it works reliably. That said, per-language indentation settings are not just desirable, they're a requirement. Most languages have some opinion on preferred indentation, and linters will complain if the wrong format is used, some languages with significant white-space will simply break if the wrong indentation is used. Organisations or projects may also dictate white-space for a language via a style guide.

    One-size-fits-all indentation makes Atom extremely cumbersome for anyone who works across multiple languages that have incompatible indentation standards.

    It appears that #3719 may provide some foundation to build per-language indentation, is this the case? Is there an issue to track this? What's involved?

  15. pdf commented on Oct 4, 2016

    @pdf

    @50Wliu thanks, I tried searching, but either my google-fu isn't working, or the documentation is lacking. Would also seem sensible to mirror the global tab settings in the language package settings GUI.

  16. winstliu commented on Oct 4, 2016

    @winstliu
    Contributor

    Would also seem sensible to mirror the global tab settings in the language package settings GUI.

    Can you elaborate? I believe they already are.

  17. pdf commented on Oct 4, 2016

    @pdf

    Language packages display a GUI setting for tabLength, but not for tabType or softTabs.

  18. winstliu commented on Oct 4, 2016

    @winstliu
    Contributor

    @pdf Can you please open a new issue for that?

  19. Ben3eeE commented on Oct 4, 2016

    @Ben3eeE
    Contributor
  20. pdf commented on Oct 4, 2016

    @pdf

    Thanks @Ben3eeE, just came to open the issue, have added a note that both settings should probably be displayed.

  21. stale commented on Oct 4, 2017

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

  22. lock commented on Apr 16, 2018

    @lock

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

  23. locked and limited conversation to collaborators on Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions