Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call denite command for 'open' action #5

Open
ratheesh opened this issue Jul 9, 2018 · 1 comment
Open

Call denite command for 'open' action #5

ratheesh opened this issue Jul 9, 2018 · 1 comment

Comments

@ratheesh
Copy link

ratheesh commented Jul 9, 2018

I would like to call :Denite file_rec<CR> command on Enter key (open action).
May I know what to set g:projectile#directory_command variable

@jiaming-shi
Copy link

It may be not possible to call Denite file_rec by setting g:projectile#directory_command variable because the custom command format is <command> <project_path>, which Denite doesn't support.

But you can overwrite the open action like this.

    def action_open(self, context):
        target = context['targets'][0]
        if not isdir(target['action__path']):
            return
        self.vim.command('lcd {}'.format(target['action__path']))
        self.vim.command('Denite file/rec')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants