Skip to content

Extends the default SLT's pop-up for adding our content without override by a new one.

License

Notifications You must be signed in to change notification settings

vic4key/sublime_text_popup_extended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sublime Text Popup Extended

Extends the SLT's default pop-up for adding our content without override by a new one.

Usage

Go to Sublime Text X\Data\Packages\User\

git submodule add --force https://github.com/vic4key/sublime_text_popup_extended.git

Create a SLT plugin and use the following sample codes

from .sublime_text_popup_extended import *

def my_popup_content(view, point) -> list:
    result = []
    word = view.substr(view.word(point))
    result.append("You are hover on '%s'" % word)
    result.append("<a href=\"http://www.google.com/search?q=%s\">Search on Google for '%s'</a>" % (word, word))
    return result

def my_on_navigate(href) -> None:
    print("href = '%s'" % href)

def plugin_loaded():
    sublime_text_popup_extended.setup(
        heading_text="My Content",
        fn_popup_content=my_popup_content,
        fn_on_navigate=my_on_navigate)

Screenshots

Contact

Feel free to contact via Twitter / Gmail / Blog / Website

About

Extends the default SLT's pop-up for adding our content without override by a new one.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages