Skip to content

Unexpected modifications when using gS / gJ #194

Description

@Kawsay

Vim version: 9.0
language: Ruby

With a line like:

foo = [ {a: 1, b: 2}, {c: 3, d: 4} ]

placing the cursor on the beginning of the array ([) then pressing gS gives me:

foo = [
  {a: 1, b: 2},
  c: 3,
  d: 4
]

when I'm expecting:

foo = [
  {a: 1, b: 2},
  {c: 3, d: 4}
]

Also, but I guess it's known and it's clearly and edge-case, joining modules with named as a single letter fails:

module A
  module B
  end
end

# cursor on A then gJ
module A module B
  end
end

Both modules need to be named with multiple letters in order to be successfully joined

module Aa
  module Bb
  end
end

# cursor on Aa then gJ
module Aa::Bb
end

# works like a charm, thanks for your wonderful plugin !

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions