def action_execute(self, context): target = context['targets'][0] command = target['source__word'] util.clear_cmdline(self.vim) if target['source__type'] == 'search': self.vim.call('denite#extra#search', command) else: self.vim.call('denite#util#execute_command', command)
def action_execute(self, context): target = context['targets'][0] command = target['source__command'] args = target['source__args'] if args: util.clear_cmdline(self.vim) self.vim.call('denite#extra#feedkeys', ':%s' % command) else: self.vim.call('denite#util#execute_command', command, False)
def action_feedkeys(self, context): target = context['targets'][0] command = target['source__word'] util.clear_cmdline(self.vim) if target['source__type'] == 'search': keys = '/%s' % command elif target['source__type'] == 'cmd': keys = ':%s' % command else: keys = command self.vim.call('denite#extra#feedkeys', keys)
def choose_action(self): candidates = self.get_selected_candidates() if not candidates: return self._vim.vars['denite#_actions'] = self._denite.get_action_names( self._context, candidates) clear_cmdline(self._vim) action = self._vim.call('input', 'Action: ', '', 'customlist,denite#helper#complete_actions') if action == '': return return self.do_action(action)
def _choose_action(denite: Default, params: Params) -> typing.Any: candidates = denite._get_selected_candidates() if not candidates or not denite._denite: return action_names = denite._denite.get_action_names(denite._context, candidates) denite._vim.vars['denite#_actions'] = action_names clear_cmdline(denite._vim) action = input(denite._vim, denite._context, 'Action: ', '', 'customlist,denite#helper#complete_actions') if action == '': return return denite.do_action(action, is_manual=True)
def action_execute(self, context): target = context['targets'][0] command = target['source__word'] util.clear_cmdline(self.vim) if target['source__type'] == 'search': self.vim.call('denite#extra#search', command) else: if target['source__type'] == 'cmd': self.vim.call('histadd', target['source__type'], command) self._execute(context, command, target.get('action__is_pause', False))