コード例 #1
0
ファイル: vintage.py プロジェクト: twolfson/sublime-files
    def run(self, edit):
        self.view.run_command('stop_record_macro')
        if not g_macro_target:
            return

        m = sublime.get_macro()
        # TODO: Convert the macro to a string before trying to store it in a
        # register
        g_registers[g_macro_target] = m
コード例 #2
0
    def run(self, edit):
        self.view.run_command('stop_record_macro')
        if not g_macro_target:
            return

        m = sublime.get_macro()
        # TODO: Convert the macro to a string before trying to store it in a
        # register
        g_registers[g_macro_target] = m
コード例 #3
0
    def run(self, name=None):
        state = VintageState(self.view)

        if name == None and not state.is_recording:
            return

        if not state.is_recording:
            self.view.run_command('unmark_undo_groups_for_gluing')
            state.latest_macro_name = name
            state.is_recording = True
            self.view.run_command('start_record_macro')
            return

        if state.is_recording:
            self.view.run_command('stop_record_macro')
            state.is_recording = False
            self.view.run_command('unmark_undo_groups_for_gluing')
            state.reset()

            # Store the macro away.
            state.macros[state.latest_macro_name] = sublime.get_macro()
コード例 #4
0
ファイル: actions.py プロジェクト: ahnan4arch/Vintageous
    def run(self, name=None):
        state = VintageState(self.view)

        if name == None and not state.is_recording:
            return

        if not state.is_recording:
            self.view.run_command('unmark_undo_groups_for_gluing')
            state.latest_macro_name = name
            state.is_recording = True
            self.view.run_command('start_record_macro')
            return

        if state.is_recording:
            self.view.run_command('stop_record_macro')
            state.is_recording = False
            self.view.run_command('unmark_undo_groups_for_gluing')
            state.reset()

            # Store the macro away.
            state.macros[state.latest_macro_name] = sublime.get_macro()
コード例 #5
0
ファイル: Registers.py プロジェクト: bernardoabreu/Registers
 def get_data(self):
     return ['macro', sublime.get_macro()]