Skip to content

Commit

Permalink
Remove overlap between basic_keys and std
Browse files Browse the repository at this point in the history
  • Loading branch information
dwight-holman committed Dec 5, 2018
1 parent 2c406c6 commit 637c89f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 22 deletions.
6 changes: 5 additions & 1 deletion language.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ def language_match(app, win):
title = win.title
#print("Window title:" + title)
if app.bundle == 'com.microsoft.VSCode':
filename = title.split(' — ', 1)[0]
if u'\u2014' in title:
filename = title.split(u' \u2014 ', 1)[0] # Unicode em dash!
elif '-' in title:
filename = title.split(u' - ', 1)[0]
elif app.bundle == 'com.apple.Terminal':
parts = title.split(' \u2014 ')
if len(parts) >= 2 and parts[1].startswith(('vi ', 'vim ')):
Expand Down Expand Up @@ -33,6 +36,7 @@ def language_match(app, win):
'state for': 'for ',
'state import': 'import ',
'state class': 'class ',
'state (past | pass)': 'pass',
})

ctx = Context('golang', func=ExtensionContext('.go'))
Expand Down
22 changes: 1 addition & 21 deletions std.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,13 @@ def copy_bundle(m):
"period <dgndictation> [over]": [". ", sentence_text],
"more <dgndictation> [over]": [" ", text],
"word <dgnwords>": word,
"tab": Key("tab"),
"left": Key("left"),
"right": Key("right"),
"up": Key("up"),
"down": Key("down"),
"delete": Key("backspace"),
"slap": [Key("cmd-right enter")],
"enter": Key("enter"),
"escape": Key("esc"),
"question [mark]": "?",
"tilde": "~",
"(bang | exclamation point)": "!",
"dollar [sign]": "$",
"downscore": "_",
"(semi | semicolon)": ";",
"colon": ":",
"(square | left square [bracket])": "[",
"(rsquare | are square | right square [bracket])": "]",
"(paren | left paren)": "(",
"(rparen | are paren | right paren)": ")",
"(brace | left brace)": "{",
Expand All @@ -62,15 +51,10 @@ def copy_bundle(m):
"(and sign | ampersand | amper)": "&",
"pipe": "|",
"(dubquote | double quote)": '"',
"quote": "'",
"triple quote": "'''",
"(dot | period)": ".",
"comma": ",",
"swipe": ", ",
"(space | skoosh)": " ",
"[forward] slash": "/",
"backslash": "\\",
"(dot dot | dotdot)": "..",
# "(dot dot | dotdot)": "..",
# "cd": "cd ",
# "cd talon home": "cd {}".format(TALON_HOME),
# "cd talon user": "cd {}".format(TALON_USER),
Expand All @@ -96,8 +80,6 @@ def copy_bundle(m):
"block": [" {}", Key("left enter enter up")],
"empty array": "[]",
"(empty dict | empty dictionary)": "{}",
"equals": "=",
"(minus | dash)": "-",
"plus": "+",
"arrow": "->",
"call": "()",
Expand Down Expand Up @@ -145,8 +127,6 @@ def copy_bundle(m):
"last tab": Key("ctrl-shift-tab"),
"next space": Key("cmd-alt-ctrl-right"),
"last space": Key("cmd-alt-ctrl-left"),
"page down": [Key("pagedown")],
"page up": [Key("pageup")],
'copy active bundle': copy_bundle,
}
)

0 comments on commit 637c89f

Please sign in to comment.