DCsunset / vscode-modal-editor

Customizable extension to turn VS Code into a modal editor
GNU Affero General Public License v3.0
36 stars 4 forks source link

Added regex to findText #4

Closed anthonyjclark closed 2 years ago

anthonyjclark commented 2 years ago

Hello,

I added regex support to findText. I found this useful for (for example):

"-": [
    {
        command: "modalEditor.findText",
        computedArgs: false,
        args: { text: "[0-9]", select: false, backward: false, regex: true }
    },
    "editor.emmet.action.decrementNumberByOne",
    "cursorLeft"
],

Feel free to ignore, change, or move the code into a new function as you want.

anthonyjclark commented 2 years ago

Also, sorry that I did not turn-off my auto-formatter. I can try to remove those line edits if you'd like.

DCsunset commented 2 years ago

Thanks for your contribution! I think it's fine to format the code. It just takes some time to distinguish the changes. I'll try to finish reviewing soon.

DCsunset commented 2 years ago

@anthonyjclark Do you have any update on this?

anthonyjclark commented 2 years ago

As long as your OK with the edits from the auto-formatter, I think it is ready for you to review. I might have misunderstood your first reply though. Let me know if there are any changes you'd like me to make.

DCsunset commented 2 years ago

Oh sorry it seems that the review was not published correctly. Now I've submitted the code review.

anthonyjclark commented 2 years ago

I agree with you on using matchAll. The newest commit does so, and it works in my limited testing.

DCsunset commented 2 years ago

It looks good to me. Thanks for your contribution!