Skip to content

Cannot expand selection past case #27

Open

Description

@i512

I'm using neovim and I've installed the latest versions of vim-textobj-rubyblock and vim-textobj-user with Plug.
For example I want to expand my selection to include method baz.

module Foo
  class Bar
    def baz(a)
      case a # << cursor
      when 1
        1
      when 2
        2
      end
    end
  end
end

When I press var it selects

      case a
      when 1
        1
      when 2
        2
      end

When I repeat ar nothing happens, selection doesn't change.

Activity

  1. i512 commented on Mar 18, 2018

    @i512
    Author

    If I start expanding from a near method to class it actually selects the method with case:

    module Foo
      class Bar
        def bar
          123 # << cursor
        end
    
        def baz(a)
          case a
          when 1
            1
          end
        end
      end
    end

    I press var and it selects:

        def bar
          123
        end

    Next I press ar and it selects the other method that includes case:

        def baz(a)
          case a
          when 1
            1
          end
        end
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