Skip to content

Instantly share code, notes, and snippets.

@astropenguin
Last active February 17, 2022 16:59
Show Gist options
  • Save astropenguin/f452cdecd94696b9ab0c00a9ba890d88 to your computer and use it in GitHub Desktop.
Save astropenguin/f452cdecd94696b9ab0c00a9ba890d88 to your computer and use it in GitHub Desktop.
{
"title": "For Vim in Japanese",
"rules": [
{
"description": "日本語入力の っj を jj にマッピングする",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "j"
},
"to": [
{
"key_code": "return_or_enter"
},
{
"key_code": "japanese_eisuu"
},
{
"key_code": "j"
}
],
"conditions": [
{
"type": "variable_if",
"name": "j_pressed",
"value": 1
},
{
"type": "input_source_if",
"input_sources": [
{
"language": "^ja$"
}
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "j"
},
"to": [
{
"set_variable": {
"name": "j_pressed",
"value": 1
}
},
{
"key_code": "j"
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
}
]
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment