def get_view_index(self, key):
        group_settings = self.get(key)
        view_group = -1
        view_index = -1
        window = sublime.active_window()
        view = window.active_view()
        current_group, current_index = window.get_view_index(view)
        for group_setting in group_settings:
            if isinstance(group_setting, int):
                view_group = group_setting
                view_index = len(window.views_in_group(view_group))
            elif (isinstance(group_setting, list) or
                    isinstance(group_setting, tuple)) and group_setting:
                view_group = group_setting[0]
                view_index = len(window.views_in_group(view_group))
                if len(group_setting) > 1:
                    view_index = group_setting[1]
            if view_group >= window.num_groups() or view_group < 0:
                view_index = -1
                continue
            elif (view_index > len(window.views_in_group(view_group)) or
                    view_index < 0):
                continue
            break

        if view_group >= window.num_groups() or view_group < 0:
            view_group = current_group
            view_index = len(window.views_in_group(view_group))
        elif (view_index >= len(window.views_in_group(view_group)) or
                view_index < 0):
            view_index = len(window.views_in_group(view_group))
        return (view_group, view_index)
List subscriptions.
dataset/ETHPy150Open spywhere/Javatar/core/settings.py/_Settings.get_view_index--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/prospective_search/prospective_search_stub.py/ProspectiveSearchStub._Dynamic_ListSubscriptions