ryu1kn / vscode-text-marker

Visual Studio Code Extension. Select text in your code and mark all matches. The marking colour is configurable
https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker
MIT License
87 stars 17 forks source link

feature request: highlight based on line numbers #51

Closed aderchox closed 3 years ago

aderchox commented 4 years ago

Really why not highlight based on line number ranges? Currently, as soon as I delete or add something to the highlighted part, the highlighting goes away.

ryu1kn commented 4 years ago

Hi @aderchox , that's because the idea is to highlight specific patterns but not their positions. A highlight goes away if you change the text to no longer match the pattern you specified, but it stays even if you change their position by inserting/deleting lines before the highlight 😃

I wonder if you wanna use something like this (I've never used it) if you want to mark positions.

ryu1kn commented 4 years ago

Let me know if I'm not quite getting what you meant!

aderchox commented 4 years ago

Hi @ryu1kn, yes I know it matches patterns, but sometimes I need to highlight multiple lines in the source code (just a focus thing! only a personal preference :D) I'm making changes to, so I searched the extensions market and there's only one other extension (other than yours) that does highlighting. However, the other one has an issue(https://github.com/jbdoster/highlighter/issues/3) and I'm using yours. Of course it does the job as long as I don't add or delete anything to it, so currently I have to comment the intended lines, highlight them and then make the changes to a copy of them. I hope I don't sound too weird 😄

ryu1kn commented 3 years ago

I know this is issue is raised a long time ago, but just answered to a similar request here: https://github.com/ryu1kn/vscode-text-marker/issues/56

Wonder if you could also use a regex pattern to highlight the blocks you want to focus on...

ryu1kn commented 3 years ago

Let me know if you still have problem with this.