Other services including will change the URL bar to allow sharing of not only a specific file, but also the line number and which character your cursor is on that line. They will also have scroll position for all open files.
If you have text highlighted, it will also include that in the URL.
All of this means you can share a link with a very similar view of what you were seeing when you made the link.
SEO: Link href anchor hook
This still doesn’t happen by default, and you can’t highlight subsections of the code or the line, or select multiple lines… but it is somewhat supported, in the most limited case, a single line, a single file
You have to know about and remember the feature and how it’s implemented… everyone does it differently
- They use character numbers, allowing you to select blocks and sub sections of the file, as well as multi-select and select in multiple files.
- Doesn’t update in real-time, you have to click the line to highlight it