Skip to content

Instantly share code, notes, and snippets.

View SarchB's full-sized avatar

SarchB SarchB

  • University of Amsterdam
  • 's-Hertogenbosch
View GitHub Profile
@EyalAr
EyalAr / count_words_in_selection.py
Last active July 1, 2021 07:35
Count words in selection - plugin for Sublime Text 3. Full blog post: http://eyalarubas.com/count-words-in-sublime-text-3.html
import sublime, sublime_plugin, re
class CountWordsInSelectionCommand(sublime_plugin.EventListener):
def on_selection_modified(self, view):
'''
listen to event 'on_selection_modified' and count words in all selected
regions when invoked.
'''