Hey guys,
how can i pass args to run_command and get them on run() function ?
Seems like documentation is clear on that. Have you checked it? http://www.sublimetext.com/docs/3/api_reference.html
what do u call “clear”? i’ve seen a lot of functions with single description but no one exemple saying how to do this. sorry. i’m a litle noob to undestand the documentation.
You would pass the arguments in as a dictionary based on what the command requires as arguments, similar to how you might apply them in a key binding. There is an unofficial list of available commands and the arguments they take.
As an example, the exec
command can take many arguments, but lets say you want to run a specific program in a specific working directory. That would be the cmd
and working_dir
arguments; you could do it as follows:
self.window.run_command ("exec", {
"cmd": "my_executable_name",
"working_dir": "/tmp/"
})