Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

auto indent not working as expected #7

Open
senny opened this issue Feb 28, 2014 · 10 comments
Open

auto indent not working as expected #7

senny opened this issue Feb 28, 2014 · 10 comments

Comments

@senny
Copy link

senny commented Feb 28, 2014

I ran into a situation where Auto Indent results in a wrong indent. I could reduce the example code to the following:

class Example
  private

  def attribute_and_value(attribute, value)
    "%s: %s" % [human_attribute_name(attribute),
      value]
  end
end

After calling Auto Indent it will look like this:

class Example
  private

  def attribute_and_value(attribute, value)
    "%s: %s" % [human_attribute_name(attribute),
      value]
    end
  end
@chibicode
Copy link
Contributor

Started running into this issue since Atom started auto-indenting on paste.

@krainboltgreene
Copy link

There's also this:

module Architect
  module Replicatable
    private def clone
      @clone
    end

    private def origin
      @origin
    end
  end
end

First + c then + v:

module Architect
  module Replicatable
    private def clone
    @clone
  end

  private def origin
  @origin
end
end
end

@krainboltgreene
Copy link

This bug honestly has cost me 10% of my development time today.

@chibicode
Copy link
Contributor

@senny's issue seems to be broken on tmbundle as well - reported an issue there: textmate/ruby.tmbundle#79

for @krainboltgreene's issue, I made a pull request: #76

@andrewpcone
Copy link

+1 to @senny's issue

@paulcsmith
Copy link

This still seems to be an issue 👍

@muppetjones
Copy link

It's atom-wide (v0.192, 0.198, 0.199): here.

@CJYate
Copy link

CJYate commented Sep 21, 2016

And it's still an issue...

@nicnilov
Copy link

+1

@danaesignal
Copy link

Spent the better part of a day trying to track down why this was happening, glad at least to see it's not just me.

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

No branches or pull requests