Skip to content

Adding regular expression searches #768

@machinedgod

Description

@machinedgod

Hello,
I'd like to add a feature to a search command so that it can do an extended regex search.
I already have the test regex code prepped, and I think I know where to plug it into the Vimb (command.c:105 ?). Of course, some guidance/handholding would be very useful.

If this is a patch that'd be accepted upstream, then in order to prep it properly, I have few options on my mind, once I have it working, on how to have it in Vimb:

  1. as an option in config.h - makes all searches into extended regex
  2. as a set parameter
  3. as different, alternative command
  4. as some sort of flag in the search command

I can probably deal with first two on my own, but would need some guidance on last two.

Also, just to avoid XY problem, this is the context:
today I wanted to select a piece of text from the webpage and store it in the clipboard, and realized that

  • caret function makes this very pedestrian
  • there's no way to hint a normal text, just links
  • there's no way (to my knowledge, after reading the manual) to select text without mouse OR using search
  • search doesn't support regex so I can't easily select a block of text

If there's a way to easily select text just with keyboard, please let me know 🪦
I have already started working on this (as mentioned I have regex code ready) and have started crashing vimb tinkering with command_search.

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