def write_whens(path:str, all_when_words:Set[str]) -> None: f = open(path, 'w') for when in sorted(all_when_words): writeL(f, when)
def write_whens(path, all_whens): f = open(path, 'w') for when in sorted(all_whens): writeL(f, when)
def write_defaults_txt(path:str, dflt_triples:List[Triple]) -> None: 'Generate keybindings.txt as starting point for customization.' f = open(path, 'w') for (cmd, key, when) in sorted(dflt_triples): when_clause = f'when {when}' if when else '' writeL(f, f'{cmd:<63} {key:23} {when_clause}'.strip())
def write_defaults_txt(path, dflt_triples): 'generate keybindings.txt as starting point for customization.' f = open(path, 'w') for (cmd, key, when) in sorted(dflt_triples): when_clause = 'when ' + when if when else '' writeL(f, '{:<63} {:23} {}'.format(cmd, key, when_clause).strip())