<commit_before>import sublime_plugin

# The following 2 lines can be generated with "grunt sublime" in the main uikit code
uikit_classes = ["uk-img-preserve", "uk-h1", "uk-h2", "uk-h3", "uk-h4", "uk-h5", "uk-h6", "uk-grid", "uk-grid-margin", "uk-grid-divider", "uk-width-1-1", "uk-width-medium-1-1", "uk-width-large-1-1", "uk-panel", "uk-grid-preserve", "uk-width-1-2", "uk-width-2-4", "uk-width-3-6", "uk-width-5-10", "uk-width-1-3", "uk-width-2-6", "uk-width-2-3", "uk-width-4-6", "uk-width-1-4", "uk-width-3-4", "uk-width-1-5", "uk-width-2-10", "uk-width-2-5", "uk-width-4-10", "uk-width-3-5", "uk-width-6-10", "uk-width-4-5", "uk-width-8-10", "uk-width-1-6", "uk-width-5-6", "uk-width-1-10", "uk-width-3-10", "uk-width-7-10", "uk-width-9-10", "uk-width-medium-1-2", "uk-width-medium-2-4", "uk-width-medium-3-6", "uk-width-medium-5-10", "uk-width-medium-1-3", "uk-width-medium-2-6", "uk-width-medium-2-3", "uk-width-medium-4-6", "uk-width-medium-1-4", "uk-width-medium-3-4", "uk-width-medium-1-5", "uk-width-medium-2-10", "uk-width-medium-2-5", "uk-width-medium-4-10", "uk-width-medium-3-5", "uk-width-medium-6-10", "uk-width-medium-4-5", "uk-width-medium-8-10", "uk-width-medium-1-6", "uk-width-medium-5-6", "uk-width-medium-1-10", "uk-width-medium-3-10", "uk-width-medium-7-10", "uk-width-medium-9-10", "uk-width-large-1-2", "uk-width-large-2-4", "uk-width-large-3-6", "uk-width-large-5-10", "uk-width-large-1-3", "uk-width-large-2-6", "uk-width-large-2-3", "uk-width-large-4-6", "uk-width-large-1-4", "uk-width-large-3-4", "uk-width-large-1-5", "uk-width-large-2-10", "uk-width-large-2-5", "uk-width-large-4-10", "uk-width-large-3-5", "uk-width-large-6-10", "uk-width-large-4-5", "uk-width-large-8-10", "uk-width-large-1-6", "uk-width-large-5-6", "uk-width-large-1-10", "uk-width-large-3-10", "uk-width-large-7-10", "uk-width-large-9-10", "uk-push-1-2", "uk-push-2-4", "uk-push-3-6", "uk-push-5-10", "uk-push-1-3", "uk-push-2-6", "uk-push-2-3", "uk-push-4-6", "uk-push-1-4", "uk-push-3-4", "uk-push-1-5", "uk-push-2-10", "uk-push-2-5", "uk-push-4-10", "uk-push-3-5", "uk-push-6-10", "uk-push-4-5", "uk-push-8-10", "uk-push-1-6", "uk-push-5-6", "uk-push-1-10", "uk-push-3-10", "uk-push-7-10", "uk-push-9-10", "uk-pull-1-2", "uk-pull-2-4", "uk-pull-3-6", "uk-pull-5-10", "uk-pull-1-3", "uk-pull-2-6", "uk-pull-2-3", "uk-pull-4-6", "uk-pull-1-4", "uk-pull-3-4", "uk-pull-1-5", "uk-pull-2-10", "uk-pull-2-5", "uk-pull-4-10", "uk-pull-3-5", "uk-pull-6-10", "uk-pull-4-5", "uk-pull-8-10", "uk-pull-1-6", "uk-pull-5-6", "uk-pull-1-10", "uk-pull-3-10", "uk-pull-7-10", "uk-pull-9-10", "uk-panel-title", "uk-panel-badge", "uk-panel-box", "uk-nav-side", "uk-panel-box-primary", "uk-panel-box-secondary", "uk-panel-header", "uk-panel-space", "uk-panel-divider", "uk-article", "uk-article-title", "uk-article-meta", "uk-article-lead", "uk-article-divider", "uk-comment-header", "uk-comment-avatar", "uk-comment-title", "uk-comment-meta", "uk-comment-body", "uk-comment-list", "uk-comment", "uk-nav", "uk-nav-header", "uk-nav-divider", "uk-nav-sub", "uk-nav-parent-icon", "uk-parent", "uk-open", "uk-active", "uk-nav-dropdown", "uk-nav-navbar", "uk-nav-search", "uk-nav-offcanvas", "uk-touch", "uk-navbar", "uk-navbar-nav", "uk-navbar-nav-subtitle", "uk-navbar-content", "uk-navbar-brand", "uk-navbar-toggle", "uk-navbar-center", "uk-navbar-toggle-alt", "uk-navbar-flip", "uk-subnav", "uk-subnav-line", "uk-subnav-pill", "uk-breadcrumb", "uk-pagination", "uk-disabled", "uk-pagination-previous", "uk-pagination-next", "uk-pagination-left", "uk-pagination-right", "uk-tab", "uk-tab-flip", "uk-tab-responsive", "uk-tab-center", "uk-tab-center-bottom", "uk-tab-bottom", "uk-tab-grid", "uk-tab-left", "uk-tab-right", "uk-list", "uk-list-line", "uk-list-striped", "uk-list-space", "uk-description-list-horizontal", "uk-description-list-line", "uk-table", "uk-table-middle", "uk-table-striped", "uk-table-condensed", "uk-table-hover", "uk-form", "uk-form-small", "uk-form-large", "uk-form-danger", "uk-form-success", "uk-form-blank", "uk-form-width-mini", "uk-form-width-small", "uk-form-width-medium", "uk-form-width-large", "uk-form-row", "uk-form-help-inline", "uk-form-help-block", "uk-form-controls", "uk-form-controls-condensed", "uk-form-stacked", "uk-form-label", "uk-form-horizontal", "uk-form-controls-text", "uk-form-icon", "uk-form-icon-flip", "uk-button", "uk-button-primary", "uk-button-success", "uk-button-danger", "uk-button-link", "uk-button-mini", "uk-button-small", "uk-button-large", "uk-button-expand", "uk-button-group", "uk-button-dropdown", "uk-icon-small", "uk-icon-medium", "uk-icon-large", "uk-icon-spin", "uk-icon-button", "uk-icon-glass", "uk-icon-music", "uk-icon-search", "uk-icon-envelope-o", "uk-icon-heart", "uk-icon-star", "uk-icon-star-o", "uk-icon-user", "uk-icon-film", "uk-icon-th-large", "uk-icon-th", "uk-icon-th-list", "uk-icon-check", "uk-icon-times", "uk-icon-search-plus", "uk-icon-search-minus", "uk-icon-power-off", "uk-icon-signal", "uk-icon-gear", "uk-icon-cog", "uk-icon-trash-o", "uk-icon-home", "uk-icon-file-o", "uk-icon-clock-o", "uk-icon-road", "uk-icon-download", "uk-icon-arrow-circle-o-down", "uk-icon-arrow-circle-o-up", "uk-icon-inbox", "uk-icon-play-circle-o", "uk-icon-rotate-right", "uk-icon-repeat", "uk-icon-refresh", "uk-icon-list-alt", "uk-icon-lock", "uk-icon-flag", "uk-icon-headphones", "uk-icon-volume-off", "uk-icon-volume-down", "uk-icon-volume-up", "uk-icon-qrcode", "uk-icon-barcode", "uk-icon-tag", "uk-icon-tags", "uk-icon-book", "uk-icon-bookmark", "uk-icon-print", "uk-icon-camera", "uk-icon-font", "uk-icon-bold", "uk-icon-italic", "uk-icon-text-height", "uk-icon-text-width", "uk-icon-align-left", "uk-icon-align-center", "uk-icon-align-right", "uk-icon-align-justify", "uk-icon-list", "uk-icon-dedent", "uk-icon-outdent", "uk-icon-indent", "uk-icon-video-camera", "uk-icon-picture-o", "uk-icon-pencil", "uk-icon-map-marker", "uk-icon-adjust", "uk-icon-tint", "uk-icon-edit", "uk-icon-pencil-square-o", "uk-icon-share-square-o", "uk-icon-check-square-o", "uk-icon-arrows", "uk-icon-step-backward", "uk-icon-fast-backward", "uk-icon-backward", "uk-icon-play", "uk-icon-pause", "uk-icon-stop", "uk-icon-forward", "uk-icon-fast-forward", "uk-icon-step-forward", "uk-icon-eject", "uk-icon-chevron-left", "uk-icon-chevron-right", "uk-icon-plus-circle", "uk-icon-minus-circle", "uk-icon-times-circle", "uk-icon-check-circle", "uk-icon-question-circle", "uk-icon-info-circle", "uk-icon-crosshairs", "uk-icon-times-circle-o", "uk-icon-check-circle-o", "uk-icon-ban", "uk-icon-arrow-left", "uk-icon-arrow-right", "uk-icon-arrow-up", "uk-icon-arrow-down", "uk-icon-mail-forward", "uk-icon-share", "uk-icon-expand", "uk-icon-compress", "uk-icon-plus", "uk-icon-minus", "uk-icon-asterisk", "uk-icon-exclamation-circle", "uk-icon-gift", "uk-icon-leaf", "uk-icon-fire", "uk-icon-eye", "uk-icon-eye-slash", "uk-icon-warning", "uk-icon-exclamation-triangle", "uk-icon-plane", "uk-icon-calendar", "uk-icon-random", "uk-icon-comment", "uk-icon-magnet", "uk-icon-chevron-up", "uk-icon-chevron-down", "uk-icon-retweet", "uk-icon-shopping-cart", "uk-icon-folder", "uk-icon-folder-open", "uk-icon-arrows-v", "uk-icon-arrows-h", "uk-icon-bar-chart-o", "uk-icon-twitter-square", "uk-icon-facebook-square", "uk-icon-camera-retro", "uk-icon-key", "uk-icon-gears", "uk-icon-cogs", "uk-icon-comments", "uk-icon-thumbs-o-up", "uk-icon-thumbs-o-down", "uk-icon-star-half", "uk-icon-heart-o", "uk-icon-sign-out", "uk-icon-linkedin-square", "uk-icon-thumb-tack", "uk-icon-external-link", "uk-icon-sign-in", "uk-icon-trophy", "uk-icon-github-square", "uk-icon-upload", "uk-icon-lemon-o", "uk-icon-phone", "uk-icon-square-o", "uk-icon-bookmark-o", "uk-icon-phone-square", "uk-icon-twitter", "uk-icon-facebook", "uk-icon-github", "uk-icon-unlock", "uk-icon-credit-card", "uk-icon-rss", "uk-icon-hdd-o", "uk-icon-bullhorn", "uk-icon-bell", "uk-icon-certificate", "uk-icon-hand-o-right", "uk-icon-hand-o-left", "uk-icon-hand-o-up", "uk-icon-hand-o-down", "uk-icon-arrow-circle-left", "uk-icon-arrow-circle-right", "uk-icon-arrow-circle-up", "uk-icon-arrow-circle-down", "uk-icon-globe", "uk-icon-wrench", "uk-icon-tasks", "uk-icon-filter", "uk-icon-briefcase", "uk-icon-arrows-alt", "uk-icon-group", "uk-icon-users", "uk-icon-chain", "uk-icon-link", "uk-icon-cloud", "uk-icon-flask", "uk-icon-cut", "uk-icon-scissors", "uk-icon-copy", "uk-icon-files-o", "uk-icon-paperclip", "uk-icon-save", "uk-icon-floppy-o", "uk-icon-square", "uk-icon-bars", "uk-icon-list-ul", "uk-icon-list-ol", "uk-icon-strikethrough", "uk-icon-underline", "uk-icon-table", "uk-icon-magic", "uk-icon-truck", "uk-icon-pinterest", "uk-icon-pinterest-square", "uk-icon-google-plus-square", "uk-icon-google-plus", "uk-icon-money", "uk-icon-caret-down", "uk-icon-caret-up", "uk-icon-caret-left", "uk-icon-caret-right", "uk-icon-columns", "uk-icon-unsorted", "uk-icon-sort", "uk-icon-sort-down", "uk-icon-sort-asc", "uk-icon-sort-up", "uk-icon-sort-desc", "uk-icon-envelope", "uk-icon-linkedin", "uk-icon-rotate-left", "uk-icon-undo", "uk-icon-legal", "uk-icon-gavel", "uk-icon-dashboard", "uk-icon-tachometer", "uk-icon-comment-o", "uk-icon-comments-o", "uk-icon-flash", "uk-icon-bolt", "uk-icon-sitemap", "uk-icon-umbrella", "uk-icon-paste", "uk-icon-clipboard", "uk-icon-lightbulb-o", "uk-icon-exchange", "uk-icon-cloud-download", "uk-icon-cloud-upload", "uk-icon-user-md", "uk-icon-stethoscope", "uk-icon-suitcase", "uk-icon-bell-o", "uk-icon-coffee", "uk-icon-cutlery", "uk-icon-file-text-o", "uk-icon-building-o", "uk-icon-hospital-o", "uk-icon-ambulance", "uk-icon-medkit", "uk-icon-fighter-jet", "uk-icon-beer", "uk-icon-h-square", "uk-icon-plus-square", "uk-icon-angle-double-left", "uk-icon-angle-double-right", "uk-icon-angle-double-up", "uk-icon-angle-double-down", "uk-icon-angle-left", "uk-icon-angle-right", "uk-icon-angle-up", "uk-icon-angle-down", "uk-icon-desktop", "uk-icon-laptop", "uk-icon-tablet", "uk-icon-mobile-phone", "uk-icon-mobile", "uk-icon-circle-o", "uk-icon-quote-left", "uk-icon-quote-right", "uk-icon-spinner", "uk-icon-circle", "uk-icon-mail-reply", "uk-icon-reply", "uk-icon-github-alt", "uk-icon-folder-o", "uk-icon-folder-open-o", "uk-icon-smile-o", "uk-icon-frown-o", "uk-icon-meh-o", "uk-icon-gamepad", "uk-icon-keyboard-o", "uk-icon-flag-o", "uk-icon-flag-checkered", "uk-icon-terminal", "uk-icon-code", "uk-icon-reply-all", "uk-icon-mail-reply-all", "uk-icon-star-half-empty", "uk-icon-star-half-full", "uk-icon-star-half-o", "uk-icon-location-arrow", "uk-icon-crop", "uk-icon-code-fork", "uk-icon-unlink", "uk-icon-chain-broken", "uk-icon-question", "uk-icon-info", "uk-icon-exclamation", "uk-icon-superscript", "uk-icon-subscript", "uk-icon-eraser", "uk-icon-puzzle-piece", "uk-icon-microphone", "uk-icon-microphone-slash", "uk-icon-shield", "uk-icon-calendar-o", "uk-icon-fire-extinguisher", "uk-icon-rocket", "uk-icon-maxcdn", "uk-icon-chevron-circle-left", "uk-icon-chevron-circle-right", "uk-icon-chevron-circle-up", "uk-icon-chevron-circle-down", "uk-icon-html5", "uk-icon-css3", "uk-icon-anchor", "uk-icon-unlock-alt", "uk-icon-bullseye", "uk-icon-ellipsis-h", "uk-icon-ellipsis-v", "uk-icon-rss-square", "uk-icon-play-circle", "uk-icon-ticket", "uk-icon-minus-square", "uk-icon-minus-square-o", "uk-icon-level-up", "uk-icon-level-down", "uk-icon-check-square", "uk-icon-pencil-square", "uk-icon-external-link-square", "uk-icon-share-square", "uk-icon-compass", "uk-icon-toggle-down", "uk-icon-caret-square-o-down", "uk-icon-toggle-up", "uk-icon-caret-square-o-up", "uk-icon-toggle-right", "uk-icon-caret-square-o-right", "uk-icon-euro", "uk-icon-eur", "uk-icon-gbp", "uk-icon-dollar", "uk-icon-usd", "uk-icon-rupee", "uk-icon-inr", "uk-icon-cny", "uk-icon-rmb", "uk-icon-yen", "uk-icon-jpy", "uk-icon-ruble", "uk-icon-rouble", "uk-icon-rub", "uk-icon-won", "uk-icon-krw", "uk-icon-bitcoin", "uk-icon-btc", "uk-icon-file", "uk-icon-file-text", "uk-icon-sort-alpha-asc", "uk-icon-sort-alpha-desc", "uk-icon-sort-amount-asc", "uk-icon-sort-amount-desc", "uk-icon-sort-numeric-asc", "uk-icon-sort-numeric-desc", "uk-icon-thumbs-up", "uk-icon-thumbs-down", "uk-icon-youtube-square", "uk-icon-youtube", "uk-icon-xing", "uk-icon-xing-square", "uk-icon-youtube-play", "uk-icon-dropbox", "uk-icon-stack-overflow", "uk-icon-instagram", "uk-icon-flickr", "uk-icon-adn", "uk-icon-bitbucket", "uk-icon-bitbucket-square", "uk-icon-tumblr", "uk-icon-tumblr-square", "uk-icon-long-arrow-down", "uk-icon-long-arrow-up", "uk-icon-long-arrow-left", "uk-icon-long-arrow-right", "uk-icon-apple", "uk-icon-windows", "uk-icon-android", "uk-icon-linux", "uk-icon-dribbble", "uk-icon-skype", "uk-icon-foursquare", "uk-icon-trello", "uk-icon-female", "uk-icon-male", "uk-icon-gittip", "uk-icon-sun-o", "uk-icon-moon-o", "uk-icon-archive", "uk-icon-bug", "uk-icon-vk", "uk-icon-weibo", "uk-icon-renren", "uk-icon-pagelines", "uk-icon-stack-exchange", "uk-icon-arrow-circle-o-right", "uk-icon-arrow-circle-o-left", "uk-icon-toggle-left", "uk-icon-caret-square-o-left", "uk-icon-dot-circle-o", "uk-icon-wheelchair", "uk-icon-vimeo-square", "uk-icon-turkish-lira", "uk-icon-try", "uk-icon-plus-square-o", "uk-close", "uk-close-alt", "uk-badge", "uk-badge-notification", "uk-badge-success", "uk-badge-warning", "uk-badge-danger", "uk-alert", "uk-alert-success", "uk-alert-warning", "uk-alert-danger", "uk-alert-large", "uk-thumbnail", "uk-thumbnail-caption", "uk-thumbnail-mini", "uk-thumbnail-small", "uk-thumbnail-medium", "uk-thumbnail-large", "uk-thumbnail-expand", "uk-overlay", "uk-overlay-area", "uk-overlay-toggle", "uk-overlay-area-content", "uk-overlay-caption", "uk-progress", "uk-progress-bar", "uk-progress-mini", "uk-progress-small", "uk-progress-success", "uk-progress-warning", "uk-progress-danger", "uk-progress-striped", "uk-search", "uk-search-field", "uk-search-close", "uk-loading", "uk-animation-fade", "uk-animation-scale-up", "uk-animation-scale-down", "uk-animation-slide-top", "uk-animation-slide-bottom", "uk-animation-slide-left", "uk-animation-slide-right", "uk-animation-shake", "uk-animation-reverse", "uk-dropdown", "uk-dropdown-flip", "uk-dropdown-up", "uk-dropdown-stack", "uk-dropdown-width-2", "uk-dropdown-width-3", "uk-dropdown-width-4", "uk-dropdown-width-5", "uk-dropdown-small", "uk-dropdown-navbar", "uk-dropdown-search", "uk-modal", "uk-modal-page", "uk-modal-dialog", "uk-modal-dialog-slide", "uk-modal-dialog-frameless", "uk-offcanvas", "uk-offcanvas-page", "uk-offcanvas-bar", "uk-offcanvas-bar-show", "uk-offcanvas-bar-flip", "uk-switcher", "uk-tooltip", "uk-tooltip-top", "uk-tooltip-top-left", "uk-tooltip-top-right", "uk-tooltip-bottom", "uk-tooltip-bottom-left", "uk-tooltip-bottom-right", "uk-tooltip-left", "uk-tooltip-right", "uk-text-small", "uk-text-large", "uk-text-bold", "uk-text-muted", "uk-text-info", "uk-text-success", "uk-text-warning", "uk-text-danger", "uk-text-left", "uk-text-right", "uk-text-center", "uk-text-justify", "uk-text-truncate", "uk-text-break", "uk-container", "uk-container-center", "uk-clearfix", "uk-nbfc", "uk-nbfc-alt", "uk-float-left", "uk-float-right", "uk-align-left", "uk-align-right", "uk-align-medium-left", "uk-align-medium-right", "uk-align-center", "uk-vertical-align", "uk-vertical-align-middle", "uk-vertical-align-bottom", "uk-height-1-1", "uk-responsive-width", "uk-responsive-height", "uk-margin", "uk-margin-top", "uk-margin-bottom", "uk-margin-left", "uk-margin-right", "uk-margin-remove", "uk-margin-top-remove", "uk-margin-bottom-remove", "uk-border-circle", "uk-heading-large", "uk-link-muted", "uk-scrollable-text", "uk-scrollable-box", "uk-display-block", "uk-display-inline", "uk-display-inline-block", "uk-visible-small", "uk-visible-medium", "uk-hidden-large", "uk-visible-large", "uk-hidden-medium", "uk-hidden-small", "uk-hidden", "uk-visible-hover", "uk-visible-hover-inline"]
uikit_data = ["data-uk-match-height", "data-uk-margin", "data-uk-alert", "data-uk-button-radio", "data-uk-button-checkbox", "data-uk-button", "data-uk-dropdown", "data-uk-grid-match", "data-uk-grid-margin", "data-uk-modal", "data-uk-offcanvas", "data-uk-nav", "data-uk-tooltip", "data-uk-switcher", "data-uk-tab", "data-uk-search", "data-uk-scrollspy", "data-uk-scrollspy-nav", "data-uk-smooth-scroll", "data-uk-toggle"]

class UIkitCompletions(sublime_plugin.EventListener):
    """
    Provide tag completions for UIkit elements and data-uk attributes
    """
    def __init__(self):
        print("init")
        self.class_completions = [("%s \tUIkit class" % s, s) for s in uikit_classes]
        self.data_completions = [("%s \t UIkit uk-data" % s, "%s=\"$1\"" % s) for s in uikit_data]

    def on_query_completions(self, view, prefix, locations):
        if view.match_selector(locations[0], "text.html string.quoted"):
            # in attribute: class="{here}"
            return self.class_completions
        elif view.match_selector(locations[0], "text.html meta.tag - text.html punctuation.definition.tag.begin"):
            # in tag: <div {here}>
            return self.data_completions<commit_msg>Only trigger completions when inside class attribute<commit_after>import sublime_plugin
import sublime

# The following 2 lines can be generated with "grunt sublime" in the main uikit code
uikit_classes = ["uk-img-preserve", "uk-h1", "uk-h2", "uk-h3", "uk-h4", "uk-h5", "uk-h6", "uk-grid", "uk-grid-margin", "uk-grid-divider", "uk-width-1-1", "uk-width-medium-1-1", "uk-width-large-1-1", "uk-panel", "uk-grid-preserve", "uk-width-1-2", "uk-width-2-4", "uk-width-3-6", "uk-width-5-10", "uk-width-1-3", "uk-width-2-6", "uk-width-2-3", "uk-width-4-6", "uk-width-1-4", "uk-width-3-4", "uk-width-1-5", "uk-width-2-10", "uk-width-2-5", "uk-width-4-10", "uk-width-3-5", "uk-width-6-10", "uk-width-4-5", "uk-width-8-10", "uk-width-1-6", "uk-width-5-6", "uk-width-1-10", "uk-width-3-10", "uk-width-7-10", "uk-width-9-10", "uk-width-medium-1-2", "uk-width-medium-2-4", "uk-width-medium-3-6", "uk-width-medium-5-10", "uk-width-medium-1-3", "uk-width-medium-2-6", "uk-width-medium-2-3", "uk-width-medium-4-6", "uk-width-medium-1-4", "uk-width-medium-3-4", "uk-width-medium-1-5", "uk-width-medium-2-10", "uk-width-medium-2-5", "uk-width-medium-4-10", "uk-width-medium-3-5", "uk-width-medium-6-10", "uk-width-medium-4-5", "uk-width-medium-8-10", "uk-width-medium-1-6", "uk-width-medium-5-6", "uk-width-medium-1-10", "uk-width-medium-3-10", "uk-width-medium-7-10", "uk-width-medium-9-10", "uk-width-large-1-2", "uk-width-large-2-4", "uk-width-large-3-6", "uk-width-large-5-10", "uk-width-large-1-3", "uk-width-large-2-6", "uk-width-large-2-3", "uk-width-large-4-6", "uk-width-large-1-4", "uk-width-large-3-4", "uk-width-large-1-5", "uk-width-large-2-10", "uk-width-large-2-5", "uk-width-large-4-10", "uk-width-large-3-5", "uk-width-large-6-10", "uk-width-large-4-5", "uk-width-large-8-10", "uk-width-large-1-6", "uk-width-large-5-6", "uk-width-large-1-10", "uk-width-large-3-10", "uk-width-large-7-10", "uk-width-large-9-10", "uk-push-1-2", "uk-push-2-4", "uk-push-3-6", "uk-push-5-10", "uk-push-1-3", "uk-push-2-6", "uk-push-2-3", "uk-push-4-6", "uk-push-1-4", "uk-push-3-4", "uk-push-1-5", "uk-push-2-10", "uk-push-2-5", "uk-push-4-10", "uk-push-3-5", "uk-push-6-10", "uk-push-4-5", "uk-push-8-10", "uk-push-1-6", "uk-push-5-6", "uk-push-1-10", "uk-push-3-10", "uk-push-7-10", "uk-push-9-10", "uk-pull-1-2", "uk-pull-2-4", "uk-pull-3-6", "uk-pull-5-10", "uk-pull-1-3", "uk-pull-2-6", "uk-pull-2-3", "uk-pull-4-6", "uk-pull-1-4", "uk-pull-3-4", "uk-pull-1-5", "uk-pull-2-10", "uk-pull-2-5", "uk-pull-4-10", "uk-pull-3-5", "uk-pull-6-10", "uk-pull-4-5", "uk-pull-8-10", "uk-pull-1-6", "uk-pull-5-6", "uk-pull-1-10", "uk-pull-3-10", "uk-pull-7-10", "uk-pull-9-10", "uk-panel-title", "uk-panel-badge", "uk-panel-box", "uk-nav-side", "uk-panel-box-primary", "uk-panel-box-secondary", "uk-panel-header", "uk-panel-space", "uk-panel-divider", "uk-article", "uk-article-title", "uk-article-meta", "uk-article-lead", "uk-article-divider", "uk-comment-header", "uk-comment-avatar", "uk-comment-title", "uk-comment-meta", "uk-comment-body", "uk-comment-list", "uk-comment", "uk-nav", "uk-nav-header", "uk-nav-divider", "uk-nav-sub", "uk-nav-parent-icon", "uk-parent", "uk-open", "uk-active", "uk-nav-dropdown", "uk-nav-navbar", "uk-nav-search", "uk-nav-offcanvas", "uk-touch", "uk-navbar", "uk-navbar-nav", "uk-navbar-nav-subtitle", "uk-navbar-content", "uk-navbar-brand", "uk-navbar-toggle", "uk-navbar-center", "uk-navbar-toggle-alt", "uk-navbar-flip", "uk-subnav", "uk-subnav-line", "uk-subnav-pill", "uk-breadcrumb", "uk-pagination", "uk-disabled", "uk-pagination-previous", "uk-pagination-next", "uk-pagination-left", "uk-pagination-right", "uk-tab", "uk-tab-flip", "uk-tab-responsive", "uk-tab-center", "uk-tab-center-bottom", "uk-tab-bottom", "uk-tab-grid", "uk-tab-left", "uk-tab-right", "uk-list", "uk-list-line", "uk-list-striped", "uk-list-space", "uk-description-list-horizontal", "uk-description-list-line", "uk-table", "uk-table-middle", "uk-table-striped", "uk-table-condensed", "uk-table-hover", "uk-form", "uk-form-small", "uk-form-large", "uk-form-danger", "uk-form-success", "uk-form-blank", "uk-form-width-mini", "uk-form-width-small", "uk-form-width-medium", "uk-form-width-large", "uk-form-row", "uk-form-help-inline", "uk-form-help-block", "uk-form-controls", "uk-form-controls-condensed", "uk-form-stacked", "uk-form-label", "uk-form-horizontal", "uk-form-controls-text", "uk-form-icon", "uk-form-icon-flip", "uk-button", "uk-button-primary", "uk-button-success", "uk-button-danger", "uk-button-link", "uk-button-mini", "uk-button-small", "uk-button-large", "uk-button-expand", "uk-button-group", "uk-button-dropdown", "uk-icon-small", "uk-icon-medium", "uk-icon-large", "uk-icon-spin", "uk-icon-button", "uk-icon-glass", "uk-icon-music", "uk-icon-search", "uk-icon-envelope-o", "uk-icon-heart", "uk-icon-star", "uk-icon-star-o", "uk-icon-user", "uk-icon-film", "uk-icon-th-large", "uk-icon-th", "uk-icon-th-list", "uk-icon-check", "uk-icon-times", "uk-icon-search-plus", "uk-icon-search-minus", "uk-icon-power-off", "uk-icon-signal", "uk-icon-gear", "uk-icon-cog", "uk-icon-trash-o", "uk-icon-home", "uk-icon-file-o", "uk-icon-clock-o", "uk-icon-road", "uk-icon-download", "uk-icon-arrow-circle-o-down", "uk-icon-arrow-circle-o-up", "uk-icon-inbox", "uk-icon-play-circle-o", "uk-icon-rotate-right", "uk-icon-repeat", "uk-icon-refresh", "uk-icon-list-alt", "uk-icon-lock", "uk-icon-flag", "uk-icon-headphones", "uk-icon-volume-off", "uk-icon-volume-down", "uk-icon-volume-up", "uk-icon-qrcode", "uk-icon-barcode", "uk-icon-tag", "uk-icon-tags", "uk-icon-book", "uk-icon-bookmark", "uk-icon-print", "uk-icon-camera", "uk-icon-font", "uk-icon-bold", "uk-icon-italic", "uk-icon-text-height", "uk-icon-text-width", "uk-icon-align-left", "uk-icon-align-center", "uk-icon-align-right", "uk-icon-align-justify", "uk-icon-list", "uk-icon-dedent", "uk-icon-outdent", "uk-icon-indent", "uk-icon-video-camera", "uk-icon-picture-o", "uk-icon-pencil", "uk-icon-map-marker", "uk-icon-adjust", "uk-icon-tint", "uk-icon-edit", "uk-icon-pencil-square-o", "uk-icon-share-square-o", "uk-icon-check-square-o", "uk-icon-arrows", "uk-icon-step-backward", "uk-icon-fast-backward", "uk-icon-backward", "uk-icon-play", "uk-icon-pause", "uk-icon-stop", "uk-icon-forward", "uk-icon-fast-forward", "uk-icon-step-forward", "uk-icon-eject", "uk-icon-chevron-left", "uk-icon-chevron-right", "uk-icon-plus-circle", "uk-icon-minus-circle", "uk-icon-times-circle", "uk-icon-check-circle", "uk-icon-question-circle", "uk-icon-info-circle", "uk-icon-crosshairs", "uk-icon-times-circle-o", "uk-icon-check-circle-o", "uk-icon-ban", "uk-icon-arrow-left", "uk-icon-arrow-right", "uk-icon-arrow-up", "uk-icon-arrow-down", "uk-icon-mail-forward", "uk-icon-share", "uk-icon-expand", "uk-icon-compress", "uk-icon-plus", "uk-icon-minus", "uk-icon-asterisk", "uk-icon-exclamation-circle", "uk-icon-gift", "uk-icon-leaf", "uk-icon-fire", "uk-icon-eye", "uk-icon-eye-slash", "uk-icon-warning", "uk-icon-exclamation-triangle", "uk-icon-plane", "uk-icon-calendar", "uk-icon-random", "uk-icon-comment", "uk-icon-magnet", "uk-icon-chevron-up", "uk-icon-chevron-down", "uk-icon-retweet", "uk-icon-shopping-cart", "uk-icon-folder", "uk-icon-folder-open", "uk-icon-arrows-v", "uk-icon-arrows-h", "uk-icon-bar-chart-o", "uk-icon-twitter-square", "uk-icon-facebook-square", "uk-icon-camera-retro", "uk-icon-key", "uk-icon-gears", "uk-icon-cogs", "uk-icon-comments", "uk-icon-thumbs-o-up", "uk-icon-thumbs-o-down", "uk-icon-star-half", "uk-icon-heart-o", "uk-icon-sign-out", "uk-icon-linkedin-square", "uk-icon-thumb-tack", "uk-icon-external-link", "uk-icon-sign-in", "uk-icon-trophy", "uk-icon-github-square", "uk-icon-upload", "uk-icon-lemon-o", "uk-icon-phone", "uk-icon-square-o", "uk-icon-bookmark-o", "uk-icon-phone-square", "uk-icon-twitter", "uk-icon-facebook", "uk-icon-github", "uk-icon-unlock", "uk-icon-credit-card", "uk-icon-rss", "uk-icon-hdd-o", "uk-icon-bullhorn", "uk-icon-bell", "uk-icon-certificate", "uk-icon-hand-o-right", "uk-icon-hand-o-left", "uk-icon-hand-o-up", "uk-icon-hand-o-down", "uk-icon-arrow-circle-left", "uk-icon-arrow-circle-right", "uk-icon-arrow-circle-up", "uk-icon-arrow-circle-down", "uk-icon-globe", "uk-icon-wrench", "uk-icon-tasks", "uk-icon-filter", "uk-icon-briefcase", "uk-icon-arrows-alt", "uk-icon-group", "uk-icon-users", "uk-icon-chain", "uk-icon-link", "uk-icon-cloud", "uk-icon-flask", "uk-icon-cut", "uk-icon-scissors", "uk-icon-copy", "uk-icon-files-o", "uk-icon-paperclip", "uk-icon-save", "uk-icon-floppy-o", "uk-icon-square", "uk-icon-bars", "uk-icon-list-ul", "uk-icon-list-ol", "uk-icon-strikethrough", "uk-icon-underline", "uk-icon-table", "uk-icon-magic", "uk-icon-truck", "uk-icon-pinterest", "uk-icon-pinterest-square", "uk-icon-google-plus-square", "uk-icon-google-plus", "uk-icon-money", "uk-icon-caret-down", "uk-icon-caret-up", "uk-icon-caret-left", "uk-icon-caret-right", "uk-icon-columns", "uk-icon-unsorted", "uk-icon-sort", "uk-icon-sort-down", "uk-icon-sort-asc", "uk-icon-sort-up", "uk-icon-sort-desc", "uk-icon-envelope", "uk-icon-linkedin", "uk-icon-rotate-left", "uk-icon-undo", "uk-icon-legal", "uk-icon-gavel", "uk-icon-dashboard", "uk-icon-tachometer", "uk-icon-comment-o", "uk-icon-comments-o", "uk-icon-flash", "uk-icon-bolt", "uk-icon-sitemap", "uk-icon-umbrella", "uk-icon-paste", "uk-icon-clipboard", "uk-icon-lightbulb-o", "uk-icon-exchange", "uk-icon-cloud-download", "uk-icon-cloud-upload", "uk-icon-user-md", "uk-icon-stethoscope", "uk-icon-suitcase", "uk-icon-bell-o", "uk-icon-coffee", "uk-icon-cutlery", "uk-icon-file-text-o", "uk-icon-building-o", "uk-icon-hospital-o", "uk-icon-ambulance", "uk-icon-medkit", "uk-icon-fighter-jet", "uk-icon-beer", "uk-icon-h-square", "uk-icon-plus-square", "uk-icon-angle-double-left", "uk-icon-angle-double-right", "uk-icon-angle-double-up", "uk-icon-angle-double-down", "uk-icon-angle-left", "uk-icon-angle-right", "uk-icon-angle-up", "uk-icon-angle-down", "uk-icon-desktop", "uk-icon-laptop", "uk-icon-tablet", "uk-icon-mobile-phone", "uk-icon-mobile", "uk-icon-circle-o", "uk-icon-quote-left", "uk-icon-quote-right", "uk-icon-spinner", "uk-icon-circle", "uk-icon-mail-reply", "uk-icon-reply", "uk-icon-github-alt", "uk-icon-folder-o", "uk-icon-folder-open-o", "uk-icon-smile-o", "uk-icon-frown-o", "uk-icon-meh-o", "uk-icon-gamepad", "uk-icon-keyboard-o", "uk-icon-flag-o", "uk-icon-flag-checkered", "uk-icon-terminal", "uk-icon-code", "uk-icon-reply-all", "uk-icon-mail-reply-all", "uk-icon-star-half-empty", "uk-icon-star-half-full", "uk-icon-star-half-o", "uk-icon-location-arrow", "uk-icon-crop", "uk-icon-code-fork", "uk-icon-unlink", "uk-icon-chain-broken", "uk-icon-question", "uk-icon-info", "uk-icon-exclamation", "uk-icon-superscript", "uk-icon-subscript", "uk-icon-eraser", "uk-icon-puzzle-piece", "uk-icon-microphone", "uk-icon-microphone-slash", "uk-icon-shield", "uk-icon-calendar-o", "uk-icon-fire-extinguisher", "uk-icon-rocket", "uk-icon-maxcdn", "uk-icon-chevron-circle-left", "uk-icon-chevron-circle-right", "uk-icon-chevron-circle-up", "uk-icon-chevron-circle-down", "uk-icon-html5", "uk-icon-css3", "uk-icon-anchor", "uk-icon-unlock-alt", "uk-icon-bullseye", "uk-icon-ellipsis-h", "uk-icon-ellipsis-v", "uk-icon-rss-square", "uk-icon-play-circle", "uk-icon-ticket", "uk-icon-minus-square", "uk-icon-minus-square-o", "uk-icon-level-up", "uk-icon-level-down", "uk-icon-check-square", "uk-icon-pencil-square", "uk-icon-external-link-square", "uk-icon-share-square", "uk-icon-compass", "uk-icon-toggle-down", "uk-icon-caret-square-o-down", "uk-icon-toggle-up", "uk-icon-caret-square-o-up", "uk-icon-toggle-right", "uk-icon-caret-square-o-right", "uk-icon-euro", "uk-icon-eur", "uk-icon-gbp", "uk-icon-dollar", "uk-icon-usd", "uk-icon-rupee", "uk-icon-inr", "uk-icon-cny", "uk-icon-rmb", "uk-icon-yen", "uk-icon-jpy", "uk-icon-ruble", "uk-icon-rouble", "uk-icon-rub", "uk-icon-won", "uk-icon-krw", "uk-icon-bitcoin", "uk-icon-btc", "uk-icon-file", "uk-icon-file-text", "uk-icon-sort-alpha-asc", "uk-icon-sort-alpha-desc", "uk-icon-sort-amount-asc", "uk-icon-sort-amount-desc", "uk-icon-sort-numeric-asc", "uk-icon-sort-numeric-desc", "uk-icon-thumbs-up", "uk-icon-thumbs-down", "uk-icon-youtube-square", "uk-icon-youtube", "uk-icon-xing", "uk-icon-xing-square", "uk-icon-youtube-play", "uk-icon-dropbox", "uk-icon-stack-overflow", "uk-icon-instagram", "uk-icon-flickr", "uk-icon-adn", "uk-icon-bitbucket", "uk-icon-bitbucket-square", "uk-icon-tumblr", "uk-icon-tumblr-square", "uk-icon-long-arrow-down", "uk-icon-long-arrow-up", "uk-icon-long-arrow-left", "uk-icon-long-arrow-right", "uk-icon-apple", "uk-icon-windows", "uk-icon-android", "uk-icon-linux", "uk-icon-dribbble", "uk-icon-skype", "uk-icon-foursquare", "uk-icon-trello", "uk-icon-female", "uk-icon-male", "uk-icon-gittip", "uk-icon-sun-o", "uk-icon-moon-o", "uk-icon-archive", "uk-icon-bug", "uk-icon-vk", "uk-icon-weibo", "uk-icon-renren", "uk-icon-pagelines", "uk-icon-stack-exchange", "uk-icon-arrow-circle-o-right", "uk-icon-arrow-circle-o-left", "uk-icon-toggle-left", "uk-icon-caret-square-o-left", "uk-icon-dot-circle-o", "uk-icon-wheelchair", "uk-icon-vimeo-square", "uk-icon-turkish-lira", "uk-icon-try", "uk-icon-plus-square-o", "uk-close", "uk-close-alt", "uk-badge", "uk-badge-notification", "uk-badge-success", "uk-badge-warning", "uk-badge-danger", "uk-alert", "uk-alert-success", "uk-alert-warning", "uk-alert-danger", "uk-alert-large", "uk-thumbnail", "uk-thumbnail-caption", "uk-thumbnail-mini", "uk-thumbnail-small", "uk-thumbnail-medium", "uk-thumbnail-large", "uk-thumbnail-expand", "uk-overlay", "uk-overlay-area", "uk-overlay-toggle", "uk-overlay-area-content", "uk-overlay-caption", "uk-progress", "uk-progress-bar", "uk-progress-mini", "uk-progress-small", "uk-progress-success", "uk-progress-warning", "uk-progress-danger", "uk-progress-striped", "uk-search", "uk-search-field", "uk-search-close", "uk-loading", "uk-animation-fade", "uk-animation-scale-up", "uk-animation-scale-down", "uk-animation-slide-top", "uk-animation-slide-bottom", "uk-animation-slide-left", "uk-animation-slide-right", "uk-animation-shake", "uk-animation-reverse", "uk-dropdown", "uk-dropdown-flip", "uk-dropdown-up", "uk-dropdown-stack", "uk-dropdown-width-2", "uk-dropdown-width-3", "uk-dropdown-width-4", "uk-dropdown-width-5", "uk-dropdown-small", "uk-dropdown-navbar", "uk-dropdown-search", "uk-modal", "uk-modal-page", "uk-modal-dialog", "uk-modal-dialog-slide", "uk-modal-dialog-frameless", "uk-offcanvas", "uk-offcanvas-page", "uk-offcanvas-bar", "uk-offcanvas-bar-show", "uk-offcanvas-bar-flip", "uk-switcher", "uk-tooltip", "uk-tooltip-top", "uk-tooltip-top-left", "uk-tooltip-top-right", "uk-tooltip-bottom", "uk-tooltip-bottom-left", "uk-tooltip-bottom-right", "uk-tooltip-left", "uk-tooltip-right", "uk-text-small", "uk-text-large", "uk-text-bold", "uk-text-muted", "uk-text-info", "uk-text-success", "uk-text-warning", "uk-text-danger", "uk-text-left", "uk-text-right", "uk-text-center", "uk-text-justify", "uk-text-truncate", "uk-text-break", "uk-container", "uk-container-center", "uk-clearfix", "uk-nbfc", "uk-nbfc-alt", "uk-float-left", "uk-float-right", "uk-align-left", "uk-align-right", "uk-align-medium-left", "uk-align-medium-right", "uk-align-center", "uk-vertical-align", "uk-vertical-align-middle", "uk-vertical-align-bottom", "uk-height-1-1", "uk-responsive-width", "uk-responsive-height", "uk-margin", "uk-margin-top", "uk-margin-bottom", "uk-margin-left", "uk-margin-right", "uk-margin-remove", "uk-margin-top-remove", "uk-margin-bottom-remove", "uk-border-circle", "uk-heading-large", "uk-link-muted", "uk-scrollable-text", "uk-scrollable-box", "uk-display-block", "uk-display-inline", "uk-display-inline-block", "uk-visible-small", "uk-visible-medium", "uk-hidden-large", "uk-visible-large", "uk-hidden-medium", "uk-hidden-small", "uk-hidden", "uk-visible-hover", "uk-visible-hover-inline"]
uikit_data = ["data-uk-match-height", "data-uk-margin", "data-uk-alert", "data-uk-button-radio", "data-uk-button-checkbox", "data-uk-button", "data-uk-dropdown", "data-uk-grid-match", "data-uk-grid-margin", "data-uk-modal", "data-uk-offcanvas", "data-uk-nav", "data-uk-tooltip", "data-uk-switcher", "data-uk-tab", "data-uk-search", "data-uk-scrollspy", "data-uk-scrollspy-nav", "data-uk-smooth-scroll", "data-uk-toggle"]

class UIkitCompletions(sublime_plugin.EventListener):
    """
    Provide tag completions for UIkit elements and data-uk attributes
    """
    def __init__(self):
        self.class_completions = [("%s \tUIkit class" % s, s) for s in uikit_classes]
        self.data_completions = [("%s \t UIkit uk-data" % s, "%s=\"$1\"" % s) for s in uikit_data]

    def on_query_completions(self, view, prefix, locations):
        if view.match_selector(locations[0], "text.html string.quoted"):
            # in attribute: attr="{here}"
            # make sure it only triggers when: class="{here}"
            pt = locations[0] - len(prefix) - 1
            SEARCH_LIMIT = 250
            search_start = max(0, pt - SEARCH_LIMIT - len(prefix))
            line = view.substr(sublime.Region(search_start, pt))
            parts = line.split('=')
            if len(parts) > 2 and parts[-2].strip().endswith("class"):
                return self.class_completions
            else:
                return []
        elif view.match_selector(locations[0], "text.html meta.tag - text.html punctuation.definition.tag.begin"):
            # in tag: <div {here}>
            return self.data_completions
{'fraction_non_alphanumeric': 0.267713797200568, 'fraction_numerical': 0.01814124670356739, 'mean_word_length': 4.429200755191944, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1418287', 'n_tokens_mistral': 14588, 'n_tokens_neox': 14283, 'n_words': 1812}