PKQ4=StickySearch.pyimport sublime, sublimeplugin # To run it open the console (Ctrl+~), # type: view.runCommand('stickySearch') class StickySearchCommand(sublimeplugin.TextCommand): def run(self, view, args): # keep sticky per window (each window has its own set) key = "StickySearch" view.window().runCommand('findAllUnder') if 'add' in args: self.add(key, view) if 'clear' in args: self.clear(key, view) if 'set' in args: self.set(key, view) self.clear_selection(view) def add(self, key, view): self.mark(key, view, view.getRegions(key)) def set(self, key, view): self.mark(key, view, []) def mark(self, key, view, regions): for s in view.sel(): regions.append(sublime.Region(s.begin(), s.end())) view.addRegions(key, regions, "marker", sublime.PERSISTENT) def clear(self, key, view): view.eraseRegions(key) def clear_selection(self, view): # create empty RegionSet object region_set = view.sel() region_set.clear() view.show(region_set) PKQ4=IIDefault.sublime-keymap PKQ4=.ǝ__ README.txt# StickySearch allows you to highlight search items, regardless of your normal (ctrl+f) search items. this plug-in search items will be kept highlighted till you manually dismiss them. you can add markers, you can reset and clear markers. ## dependencies this plug-in is using an experimental sublime text API, exposed on 20091017 beta. to define what color you want to see for the marked text, you should edit your theme file, and add the following: name Marker scope marker settings fontStyle foreground #FFFF77 # Usage This is the official binding: * 'set' will mark the new item, after clearing the old markers * 'add' will mark the new item, leaving other marking as they were * 'clear' will clean all the markings * 'findNext' is equivalent to F3, it will ittirate over the last mark search resultsPKQ4=StickySearch.pyPKQ4=II4Default.sublime-keymapPKQ4=.ǝ__ README.txtPK8