当前位置: 首页>>代码示例>>Python>>正文


Python windows.focus函数代码示例

本文整理汇总了Python中util.windows.focus函数的典型用法代码示例。如果您正苦于以下问题:Python focus函数的具体用法?Python focus怎么用?Python focus使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了focus函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: key_result

    def key_result(self):
        windows.focus(3)
        buffers.result.open()
        self._current_buffer_second = buffers.result
        self.diff(self._current_diff_mode)

        self.redraw_hud()
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例2: key_original

    def key_original(self):
        windows.focus(2)
        buffers.original.open()
        self._current_buffer_first = buffers.original
        self.diff(self._current_diff_mode)

        self.redraw_hud()
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例3: _diff_1

    def _diff_1(self):
        self.diffoff()
        self._current_diff_mode = 1

        for i in range(2, self._number_of_windows + 2):
            windows.focus(i)
            vim.command('diffthis')
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例4: key_two

 def key_two(self):
     windows.focus(3)
     buffers.two.open()
     self._current_mid_buffer = buffers.two
     self.diff(self._current_diff_mode)
     windows.focus(3)
     self.redraw_hud()
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例5: _diff_3

    def _diff_3(self):
        self.diffoff()
        self._current_diff_mode = 3

        windows.focus(3)
        vim.command('diffthis')

        windows.focus(4)
        vim.command('diffthis')
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:9,代码来源:modes.py

示例6: redraw_hud

    def redraw_hud(self):
        with windows.remain():
            windows.focus(1)

            vim.command('setlocal modifiable')
            buffers.hud.set_lines(self.hud_lines())
            vim.command('setlocal nomodifiable')

            vim.command('set winfixheight')
            vim.command('resize ' + setting('hud_size', '3'))
            vim.command('wincmd =')
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:11,代码来源:modes.py

示例7: _key_use_12

    def _key_use_12(self, target):
        targetwin = 2 if target == 1 else 4

        with windows.remain():
            self.diffoff()

            windows.focus(3)
            vim.command('diffthis')

            windows.focus(targetwin)
            vim.command('diffthis')
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:11,代码来源:modes.py

示例8: diffoff

    def diffoff(self):
        with windows.remain():
            for winnr in range(2, 2 + self._number_of_windows):
                windows.focus(winnr)
                curbuffer = buffers.current

                for buffer in buffers.all:
                    buffer.open()
                    vim.command('diffoff')
                    if setting('wrap'):
                        vim.command('setlocal ' + setting('wrap'))

                curbuffer.open()
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:13,代码来源:modes.py

示例9: _layout_0

    def _layout_0(self):
        self._number_of_windows = 1
        self._current_layout = 0

        # Open the layout
        windows.close_all()

        # Put the buffers in the appropriate windows
        windows.focus(1)
        self._current_buffer.open()

        self.open_hud(2)

        windows.focus(2)
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:14,代码来源:modes.py

示例10: scrollbind

    def scrollbind(self, enabled):
        if self._current_diff_mode:
            return

        with windows.remain():
            self._current_scrollbind = enabled

            for winnr in range(2, 2 + self._number_of_windows):
                windows.focus(winnr)

                if enabled:
                    vim.command('set scrollbind')
                else:
                    vim.command('set noscrollbind')

            if enabled:
                vim.command('syncbind')
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:17,代码来源:modes.py

示例11: key_one

 def key_one(self):
     if self._current_layout == 0:
         windows.focus(3)
     elif self._current_layout == 1:
         windows.focus(2)
     elif self._current_layout == 2:
         windows.focus(2)
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例12: goto_result

 def goto_result(self):
     if self._current_layout == 0:
         windows.focus(5)
     elif self._current_layout == 1:
         windows.focus(3)
     elif self._current_layout == 2:
         windows.focus(3)
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:7,代码来源:modes.py

示例13: _layout_1

    def _layout_1(self):
        self._number_of_windows = 3
        self._current_layout = 1

        # Open the layout
        windows.close_all()
        windows.split()
        windows.split()

        # Put the buffers in the appropriate windows
        windows.focus(1)
        buffers.original.open()

        windows.focus(2)
        self._current_mid_buffer.open()

        windows.focus(3)
        buffers.result.open()

        self.open_hud(4)

        windows.focus(4)
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:22,代码来源:modes.py

示例14: _layout_2

    def _layout_2(self):
        self._number_of_windows = 4
        self._current_layout = 2

        # Open the layout
        windows.close_all()
        windows.split()
        windows.split()

        # Put the buffers in the appropriate windows
        windows.focus(1)
        buffers.one.open()

        windows.focus(2)
        buffers.result.open()

        windows.focus(3)
        buffers.two.open()

        self.open_hud(4)

        windows.focus(3)
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:22,代码来源:modes.py

示例15: open_hud

 def open_hud(self, winnr):
     windows.split()
     windows.focus(winnr)
     buffers.hud.open()
     vim.command('wincmd K')
     self.redraw_hud()
开发者ID:raphael-proust,项目名称:threesome.vim,代码行数:6,代码来源:modes.py


注:本文中的util.windows.focus函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。