Skip to content

support multiline search #20

@windwp

Description

@windwp

support multiline search

                ['multiline'] = {
                    desc = 'search multiline',
                    icon = '[M]',
                    value = '--multiline',
                },

problem

  • if we add this to rg search option we can search across multi line with \n but it have wrong total result because we read everyline and map it to a result

  • the highlight is not correct too because we use vim to highlight vim doesn't support \n. It only read 1 line to highlight

  • sed is not support replace with range on multiple line. I use sed because it use a same syntax of vim and vim group name replace. but it will broken on multiple

https://github.com/microsoft/vscode/blob/b385fa7ceb2b537e0ba2b58edaa162f4e299a947/src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts

current solution is search 1 line and use quickfix to run macro cdo 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions