Home Download Buy Blog Forum Support

[ST3] StickySearch - persistent highlight of selected text

[ST3] StickySearch - persistent highlight of selected text

Postby vim on Fri Mar 01, 2013 8:22 pm

StickySearch - persistent highlight of selected text

https://github.com/vim/StickySearch

Usage

To hightlight text under cursor:
Super + 8 for Mac OS X
Ctrl + 8 for Windows/Linux


To highlight more text (while keeping previous highlights):
Shift + Super + 8 for Mac OS X
Shift + Ctrl + 8 for Windows/Linux


To clear all highlighted text:
Alt + Super + 8 for Mac OS X
Alt + Ctrl + 8 for Windows/Linux
Attachments
Screen Shot 2013-03-01 at 21.57.44 .png
Screen Shot 2013-03-01 at 21.57.44 .png (98.77 KiB) Viewed 1303 times
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm

Re: [ST3] StickySearch - persistent highlight of selected text

Postby robertcollier4 on Sat Mar 02, 2013 1:31 pm

Nice, I did something similar but the problem with self.clear_selection(view) is that the keyboard cursor disappears from the editor view and you have to reclick in the editor. You also lose your previous keyboard cursor position.

An alternative to keep the keyboard cursor intact is that you can use view.substr(view.sel()[0] to get the current selection and then use find_all, check out MarkLinesContaining but change sublime.HIDDEN to sublime.DRAW_OUTLINED and it should achieve the same thing as this.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: [ST3] StickySearch - persistent highlight of selected text

Postby vim on Sat Mar 02, 2013 4:01 pm

robertcollier4 wrote: You also lose your previous keyboard cursor position.


Thanks for this - fixed :-)
vim
 
Posts: 298
Joined: Tue May 27, 2008 6:51 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests