I’m not familiar with the Typerwriter package, so I can’t help with that other than to say that if it doesn’t have the ability to set setting on a per file type basis and it has its own settings file, the package would most likely need to be updated to provide that kind of support.
For key bindings and makonig a key binding specific to a particular kind of file you use the concept of a context
on the key binding. For example this binding from the defaults:
// HTML, XML close tag
{ "keys": ["/"], "command": "close_tag", "args": { "insert_slash": true }, "context":
[
{ "key": "selector", "operator": "equal", "operand": "(text.html, text.xml) - string - comment", "match_all": true },
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*<$", "match_all": true },
{ "key": "setting.auto_close_tags" }
]
}
Here there are three contexts that must all be true for this binding to do anything; this needs to be an HTML or Text file that’s not inside of a string or comment, the text that comes before this must have some sort of open tag, and the auto_close_tags
setting has to be turned on.
So to make a binding specific to say Python, you would use selector
context here using the scope for Python. You can determine the value to use by using Tools > Developer > Show Scope Name
while a particular file has the input focus. Whatever this displays, the first line of the scope is the one to use in the binding (unless you want to be really specific about where exactly in a particular type of file the binding should apply).
More information on contexts and how they work, including some demos, can be found in this video: