Current the command_history in python API, only stores view specific commands. Keeping track also on the commands executed from the command_pallete would be quite useful.
Nevermind, I was pointer to the eventListener which solved the issue I think.
history = [("no history","")]
def run(self, edit):
history_list = ["%s\n %s" % pair for pair in history]
flags = sublime.KEEP_OPEN_ON_FOCUS_LOST
sublime.active_window().show_quick_panel(history_list, lambda x: print(x), flags)
def appendCommand(self, cmd, args):
item = (cmd, args)
blacklist = ['show_panel', 'quick_panel', 'hide_panel']
if cmd in blacklist: # skip opening panels etc.
if item in history: # skip duplicates
limit = 20 # keep last 20
history = history[:limit]
def on_post_window_command(self, window, command_name, args):