Home Download Buy Blog Forum Support

ST3: "--command" option in command line

ST3: "--command" option in command line

Postby KoCMoHaBT on Fri Feb 28, 2014 2:28 pm


I trying to make plugin to open some files. It very simple (not real one, but for idea undertanding):
Code: Select all
import sublime, sublime_plugin

class OpenLogsCommand(sublime_plugin.WindowCommand):
   def run(self, move = True):
      self.window.set_layout({'cols': [0.0, 0.5, 1.0],'rows': [0.0, 1.0],'cells': [[0, 0, 1, 1], [1, 0, 2, 1]]})

This plugin can be run from python command line "window.run_command("open_logs")" or from command palette. So, it's working.
I want to run it from command line, something like:
Code: Select all
subl --command "open_logs"

but it not working at all. In the sublime python log I see, that the plugin was loaded, but it not run.
I try to run this way a standard command "show_about_window":
Code: Select all
subl --command "show_about_window"

and it works.
What I doing wrong?

PS: Another thing... As I understand, the command "subl --command "show_about_window"" opened two sublime windows instead of one. I think this is a bug.
Posts: 2
Joined: Fri Jul 12, 2013 2:31 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], observingly and 25 guests