lawlist wrote:After several hours of experimenting, I was unable to get the lambda timeout code to work with this particular plugin. I ended up including a lambda timeout statement within the particular plugin that was being chained as a workaround. If anyone could please provide a few keymap examples of how to use the lambda timeout code proposed by sashabe, that would be greatly appreciated.

I don't have any example, but I'm not really sure what sashabe was trying to do. Using set_timeout will in fact cause the commands to be delayed by the specified time. But note that the method will return immediately. The subsequent commands will be issued with the the same timeout, but issued "instantaneously", so I don't think you would get the delay between commands you want. I could be wrong though, I didn't test it. I was linking to this post and decided to browse through the thread while I was at it

Hi everybody, it's the same sashabe, I was forced to register under new user name because the forum doesn't allow you to reset passwords if forgotten.Here's a bit modified version of plugin which allows custom delays to be given for each executed command. If no argument is present the delay=0.To skuroda - I experienced no problems with delay working on Windows and Mac.

# Takes an array of commands (same as those you'd provide to a key binding) with# an optional context (defaults to view commands) & runs each command in order.# Valid contexts are 'text', 'window', and 'app' for running a TextCommand,# WindowCommands, or ApplicationCommand respectively.class RunMultipleCommandsCommand(sublime_plugin.TextCommand): def exec_command(self, command): if not 'command' in command: raise Exception('No command name provided.')

I just ran your plugin (replaced sftp_upload_file with save and changed the context accordingly). The save occurs after 2.5 seconds. I think lawlist wanted the commands to occur in such a way that the save would execute after 5 seconds had passed. I tested on W7 x64 build 3046.

So, as far as I can tell this functionality is basically fundamental to being able to define repeated commands, i.e. this is the equivalent of concatenation in a vimscript map.

Will this become the standard way of scripting keys for vintage mode or all of sublime text? It would appear that the alternative is to extract out whatever behavior it is you want and make a whole plugin for it, which is perhaps not completely absurd but a heckuva lot more work than e.g. writing a new vim bind in the vimrc!

Even defining the new JSON definition using this plugin is much harder than in most anything else... I just really wish there was a more clean way to do it.