Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Highlight char ranges by line/column #211

Open
thesilican opened this issue May 9, 2024 · 0 comments
Open

Feature: Highlight char ranges by line/column #211

thesilican opened this issue May 9, 2024 · 0 comments

Comments

@thesilican
Copy link
Contributor

In addition to highlighting chars using a search string, allow the user to specify char ranges to be highlighted using a line/column syntax. This would provide a way to work around #70.

The meta string {a:b-c:d} would highlight characters from line a column b to line c column d.

For example, the following would highlight the string "Hello, world!":

```python {2:11-2:25}
def main():
    print("Hello, world!")
```

This could be integrated together with line highlighting syntax, for example

{1,2-3,4:2-4:10}

Some other considerations include handling the case for highlighting a single char {4:10}, as well as ranges that mix line and char indexes {4-5:8} or {3:20-8}.

I used the colon for the delimiting character as an example 1:2-3:4, other possible options include a slash 1/2-3/4, dot 1.2-3.4, or pipe 1|2-3|4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant