I want to define some key bindings for py files. but I don’t want change the (default) command of any key for other files. Or I want define the same key binding for files of different types with different functions or effects. Is that possible? What should I do?
I know we can build a plugin define a TextCommand then use self.get_file_type() to get the type of current file, then … But it is not convenient.