Sublime Text 2 – Highlight All Instances of Words

I love the feature of the e Text Editor to highlight all instances of the word that your cursor is currently on. This is a difficult feature to describe, but see in the screen capture to the right that I have my cursor on one instance of “sel” and all other instances of the word are highlighted in yellow.

I recently heard about the new version of Sublime Text 2, a text editor that promises to become “a text editor you’ll fall in love with.” It does not, however, have this feature that I have come to depend on in e. Luckily, as they are building this new version of Sublime Text, the development team is using User Echo to allow feature requests to be generated by the community. I found this feature in a request – Upon selecting a word, highlight all occurrences.

In this post, a user had posted a plugin to take care of this feature, but in this plugin you had to select the word to get it to be highlighted. My request was for any word that you have your cursor on to be highlighted across the entire document. I requested this change, and less than 4 hours later, the plugin author had responded with an update to his plugin.

I have copied the plugin below, but the latest version can always be found at GitHub. Thanks a lot to adzenith for his plugin and service to the community. – with highlight when selection is empty