This is a simple Python program that provides forward-search capability between Sublime Text and Google Chrome. When editing a markdown file in Sublime Text, selecting "Scroll to Text in Browser" will tell Chrome to search for the text on the current line in Sublime Text and, if found, scroll it into view. A short animation will also be invoked on the element, making it clear which one it is.
Here’s a demonstration:
demo.mp4
This only works on a Mac, because it uses AppleScript to communicate between Sublime Text and the browser. There are probably ways to do this on a Windows machine, but I don’t have one.
-
Create a folder named
ScrollToTextinside~/Library/Application Support/Sublime Text/Packages/and copy all of these files into there. -
Restart Sublime Text.