Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
titouandk opened this issue Jun 30, 2022 · 0 comments
Open

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

titouandk opened this issue Jun 30, 2022 · 0 comments

Comments

@titouandk
Copy link

titouandk commented Jun 30, 2022

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 😉

@titouandk titouandk changed the title keymaps - detect if insert mode map key if insert mode Jun 30, 2022
@titouandk titouandk changed the title map key if insert mode different key mappings in insert/command/visual modes Jul 1, 2022
@titouandk titouandk changed the title different key mappings in insert/command/visual modes same key with different mappings in insert/command/visual modes Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant