Skip to content

Smart selection mode #810

@Bekaboo

Description

@Bekaboo

Is your feature request related to a problem? Please describe.

It would be nice if we could have "smart" selection mode, i.e., if the textobject takes up whole line/lines, use line-wise select, else use char-wise select. E.g., for the following lua function, use line-wise select:

local function my_func()
    return
end

But for this function, use char-wise select, as it does not take up a whole line at the beginning of the function:

local my_func = function()
    return
end

Describe the solution you'd like

Smartly detect if a textobj should have line-wise selection or char-wise selection based on its range.

Describe alternatives you've considered
N/A

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions