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.

pressing tab inconsistent #5192

Closed
Closed

Description

@Cipa

I have 2 js files
In one a tab key press generates a tab in the other one it generates 4 spaces

Any ideas what could be wrong?
The key binding resolver generates the same lines

Activity

  1. winstliu commented on Jan 21, 2015

    @winstliu
    Contributor

    One of your files probably is being identified as a soft tabs file while the other is being detected as a hard tabs file.

  2. Cipa commented on Jan 21, 2015

    @Cipa
    Author

    I edited the file in other editor(replaced all the .... with tab), updated to 175 and now everything is ok.
    Seems that if I want to use tabs in files that use soft tas I need to first convert all the soft tabs to hard tabs. Not sure if this is a bug or feature

  3. reopened this on Jan 26, 2015
  4. Cipa commented on Jan 26, 2015

    @Cipa
    Author

    Hi,
    I am not sure how to debug this
    While I was coding the hard tab functionality switched to soft tab for apparently no reason
    Now when I press tab or hit return to go to next row I get soft tabs even if the whole file is using regular tabs

    I'm on 0.175.0

    Let me know if there is some log you want me to send

    screen shot 2015-01-26 at 12 54 40 pm

    Update: I restarted and the problem is still there

  5. Cipa commented on Jan 26, 2015

    @Cipa
    Author

    After restart and after I reopened the file the problem is still there. Copy pasting the same code transforms tabs into soft tabs

    screen shot 2015-01-26 at 1 01 56 pm

    Here are my settings
    screen shot 2015-01-26 at 1 03 36 pm

    Update: restarted with atom --safe, problem still there, I am wondering if there are any caches that I could clear with some terminal command

  6. Cipa commented on Jan 26, 2015

    @Cipa
    Author

    What seem to have fixed the problem
    restarted in safe mode
    edited the first line of the js file(it had a 1space tab ????? I should have saved the code)
    closed the js file with the problem
    quit atom
    restart atom in normal mode
    open js file

    Note: php files were working correctly while this was happening

    Please let me know if you need some logs if this still happens and how should I get to those logs
    Thx

  7. benogle commented on Jan 26, 2015

    @benogle
    Contributor

    It does auto detection. So if you open a file with some soft tabs at the top of the file, but the rest are hard tabs, it will still use soft tabs, despite the setting and despite the existence of hard tabs in the file. We plan to fix this with #3719.

    For now, just make sure your entire file has hard tabs, and it should pick hard tabs.

  8. benogle commented on Jan 28, 2015

    @benogle
    Contributor

    If this is still an issue, please reopen

  9. 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.

  10. lock commented on Apr 7, 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!

  11. locked and limited conversation to collaborators on Apr 7, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions