How to use the hist.history.insert function in hist

To help you get started, we’ve selected a few hist examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github randy3k / AlignTab / aligntab.py View on Github external
lambda: self.on_change(None) if live_preview else None
            )
            v.run_command("select_all")
            v.settings().set('AlignTabInputPanel', True)
        else:
            user_input = resolve_input(user_input)
            error = []
            for uinput in user_input:
                # apply align_tab
                aligner = Aligner(view, uinput, mode)
                self.aligned = aligner.run(edit)

                if self.aligned:
                    if mode:
                        # to allow keybinds/commands for tablemode
                        history.insert(uinput)
                        toggle_table_mode(view, True)
                    else:
                        sublime.status_message("")
                else:
                    if mode and not aligner.adjacent_lines_match():
                        toggle_table_mode(view, False)
                    else:
                        error.append(uinput)
            if error:
                errors = '    '.join(error)
                sublime.status_message("[Patterns not Found:   " + errors + "   ]")
github randy3k / AlignTab / aligntab.py View on Github external
def on_done(self, user_input, mode, live_preview):
        history.insert(user_input)
        # do not double align when done with live preview mode
        if not live_preview:
            self.view.run_command("align_tab", {"user_input": user_input, "mode": mode})

hist

Hist classes and utilities

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

81 / 100
Full package analysis

Similar packages