Python源码示例:neovim.autocmd()

示例1
def launchdebugtab(self):
        # if necessary, get the virtual env setup
        # autocmd FileType python nnoremap <silent> <leader>td :tabnew
        # term://source ${HOME}/.virtualenvs/$(cat .dbve)/bin/activate
        # && python -mpudb %<CR>:startinsert<CR>
        new_term_tab_cmd = 'tabnew term://{} -m pudb.run {}'.format(
            self.launcher(),
            self.entrypoint())
        __logger__.info('Starting debug tab with command:\n    {}'.format(
            new_term_tab_cmd))
        self.nvim.command(new_term_tab_cmd)
        # we have to wait for the terminal to be opened...
        self.nvim.command('startinsert')