質問編集履歴

1

2022/01/14 04:55

投稿

xekdwpsg
xekdwpsg

スコア20

test CHANGED
@@ -1 +1 @@
1
- VSCodeVimでノーマルモードでsキーをキーバインドに使いたい
1
+ Excepteur sint occaecat cupidatat non proident
test CHANGED
@@ -1,63 +1 @@
1
- VSCodeVimのノーマルモードで、例えば「`ss`で保存」のように`s`キーを使ったキーバインドを追加したいです。
2
-
3
- 本来の`s`キーの機能「カーソル上の文字を消して挿入モードへ」は使えなくなって構いません。
4
-
5
-
6
-
7
- まず以下のようにしてみましたが、`s`を押した瞬間、本来の「カーソル上の文字を消して挿入モードへ」が発動してしまい、だめでした。
8
-
9
-
10
-
11
- ```
12
-
13
- "vim.normalModeKeyBindings": [
14
-
15
- {
16
-
17
- "before": ["s", "s"],
18
-
19
- "after": [":", "w", "<CR>"]
20
-
21
- }
22
-
23
- ]
24
-
25
- ```
26
-
27
-
28
-
29
- そこで以下のように`s`に何もしないものを登録してみましたが、これでも`ss`で保存はできませんでした。
30
-
31
-
32
-
33
- ```
34
-
35
- "vim.normalModeKeyBindings": [
36
-
37
- {
38
-
39
- "before": ["s"],
40
-
41
- "after": [""]
42
-
43
- },
44
-
45
- {
46
-
47
- "before": ["s", "s"],
48
-
49
- "after": [":", "w", "<CR>"]
50
-
51
- }
52
-
53
- ]
54
-
55
- ```
56
-
57
-
58
-
59
- `vim.normalModeKeyBindingsNonRecursive`の方に追加してみても同じ結果でした。
60
-
61
-
62
-
63
- お力をお貸しいただければ幸いです。
1
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.