Closed aderchox closed 3 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.
Let me know if I'm not quite getting what you meant!
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 😄
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...
Let me know if you still have problem with this.
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.