atom / whitespace

Atom whitespace package
MIT License
94 stars 67 forks source link

Convert tabs to spaces is broken #149

Open brendanfalkowski opened 7 years ago

brendanfalkowski commented 7 years ago

Description

"Whitespace > Convert Tabs to Spaces" does not work in Atom 1.14.3 and 1.14.4.

Steps to Reproduce

  1. Run "Whitespace > Convert Tabs to Spaces"

Expected behavior: Tabs are replaced by spaces.

Actual behavior: Nothing happens.

Reproduces how often: 100%

Versions

Atom : 1.14.4 Electron: 1.3.13 Chrome : 52.0.2743.82 Node : 6.5.0

Additional Information

In Atom Safe Mode, replacement does have an effect but it only deletes all tabs (no replacement with spaces) which wrecks indentation.

maxbrunsfeld commented 7 years ago

Can you upgrade to the latest Atom version (1.18.0 or 1.19.0-beta0) and report whether this still happens?

brendanfalkowski commented 7 years ago

I have 1.17.2 which is the current stable. I'm not brave enough to run betas and do work all day.

Spaces to tabs = works Tabs to spaces = fails

Video: https://cl.ly/kzYw

Hope that helps somewhat.

l-fischer commented 7 years ago

+1 This is happening for me also

maxbrunsfeld commented 7 years ago

@l-fischer What version of Atom are you using?

l-fischer commented 7 years ago

@maxbrunsfeld 1.18.0

oyeanuj commented 7 years ago

@maxbrunsfeld Spaces to Tab also doesn't work for me on any JS or Ruby file, regardless of whether the content is highlighted. I'm on Atom 1.20-beta2.

Terrabits commented 6 years ago

If I convert spaces to tabs, then tabs to spaces both conversions happen. Spaces to tabs converts correctly. The problem is, tabs to spaces converts several tabs into one set of spaces (i.e. all indents are lost).

I'm using released version 1.22.0 ia32

srperetz commented 6 years ago

I have a javascript file open in Atom 1.23.1 (on Sierra 10.12.6) that has hard tabs. When I select Convert Tabs to Spaces or Convert All Tabs to Spaces, nothing happens. Still all hard tabs.

winstliu commented 6 years ago

@srperetz does this happen for all files, or just that specific JS file? Can you reproduce this in safe mode (atom --safe)?

srperetz commented 6 years ago

@50Wliu it happens with all the files I've tried (multiple .js files and .sh files).

srperetz commented 6 years ago

@50Wliu no difference in safe mode either.

monikajaskolka commented 6 years ago

Still having this issue for Atom 1.25.0. Safe mode has no effect.

ppt000 commented 6 years ago

same here on Atom 1.26.1

surdu commented 6 years ago

If I convert Tabs to Spaces, no matter how many tabs I have, all tabs will be converted to only 2 spaces. It doesn't care of file type, as far as I can tell.

Version 1.29.0-beta1 safe mode

surdu commented 6 years ago

I manage to fix the issue by completely removing Atom and all related files and re-installing it from scratch.

Other plugins have also started failing and I suspected that because I'm using sync-settings some setting may have been compromised. Maybe some setting became deprecated and sync-settings kept them around, I don't know.