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

shortcut key problem #68

Open
iamaddy opened this issue Jul 27, 2016 · 1 comment
Open

shortcut key problem #68

iamaddy opened this issue Jul 27, 2016 · 1 comment

Comments

@iamaddy
Copy link

iamaddy commented Jul 27, 2016

when I bind the shortcut key like this:
[{"keys": ["f4"], "command": "gulp", "args": { "task_name": "detault" }}]
I press f4,the log show“ can't find the gulpfile”,because it will directly find gulpfile from root path.
so I add some code like this in base_command.py

def run(self, task_name=None, task_flag=None, silent=False, paths=[]):
        self.setup_data_from_settings()
        self.task_name = task_name

        self.task_flag = task_flag if task_name is not None and task_flag is not None else self.get_flag_from_task_name()
        self.silent = silent
        self._working_dir = ""
        view = sublime.active_window().active_view()
        if len(paths) < 1:
            paths= [view.file_name()]

        self.sercheable_folders = [os.path.dirname(path) for path in paths] if len(paths) > 0 else self.window.folders()
        self.output_view = None
        self.work()

after this, it will find gulpfile from active_view

@nicosantangelo
Copy link
Owner

Hello, thanks for the feedback!

I'm not sure if I understood you correctly but it seems like you can solve this problem using gulpfile_paths and maybe per project settings

Let me know if I'm missing the mark here

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