Skip to content

same key with different mappings in insert/command/visual modes #215

@titouandk

Description

@titouandk

Hello,

I would like a key combination:

  • To do something in INSERT MODE
  • To do something else in COMMAND MODE
  • And something else in VISUAL MODE.

Here is a simplified example:

{ "keys": ["ctrl+super+alt+j"], "command": "insert_snippet", "args": {"contents": "1"}, "context":
	[ { "key": "setting.command_mode" } ]
},
{ "keys": ["ctrl+super+alt+j"], "command": "insert_snippet", "args": {"contents": "2"}, "context":
	[ { "key": "setting.insert_mode" } ]
},
{ "keys": ["ctrl+super+alt+j"], "command": "insert_snippet", "args": {"contents": "3"}, "context":
	[ { "key": "setting.visual_mode" } ]
}

It seems like the setting.insert_mode and setting.visual_mode variables do not exist.

Does someone see a way to do this?

Thank you 😉

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions