Exemplo n.º 1
0
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)
Exemplo n.º 2
0
def write_whens(path, all_whens):
  f = open(path, 'w')
  for when in sorted(all_whens):
    writeL(f, when)
Exemplo n.º 3
0
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())
Exemplo n.º 4
0
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())