We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0514f28 commit 79193c0Copy full SHA for 79193c0
keymap/vim.js
@@ -64,9 +64,9 @@
64
{ keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
65
{ keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
66
{ keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },
67
- { keys: 's', type: 'keyToKey', toKeys: 'xi', context: 'visual'},
+ { keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual'},
68
{ keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },
69
- { keys: 'S', type: 'keyToKey', toKeys: 'dcc', context: 'visual' },
+ { keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' },
70
{ keys: '<Home>', type: 'keyToKey', toKeys: '0' },
71
{ keys: '<End>', type: 'keyToKey', toKeys: '$' },
72
{ keys: '<PageUp>', type: 'keyToKey', toKeys: '<C-b>' },
test/vim_test.js
@@ -1045,6 +1045,20 @@ testVim('D_visual_block', function(cm, vim, helpers) {
1045
eq('1\n5\na', cm.getValue());
1046
}, {value: '1234\n5678\nabcdefg'});
1047
1048
+testVim('s_visual_block', function(cm, vim, helpers) {
1049
+ cm.setCursor(0, 1);
1050
+ helpers.doKeys('<C-v>', '2', 'j', 'l', 'l', 'l', 's');
1051
+ var replacement = fillArray('hello{', 3);
1052
+ cm.replaceSelections(replacement);
1053
+ eq('1hello{\n5hello{\nahello{fg\n', cm.getValue());
1054
+ helpers.doKeys('<Esc>');
1055
+ cm.setCursor(2, 3);
1056
+ helpers.doKeys('<C-v>', '1', 'k', 'h', 'S');
1057
+ replacement = fillArray('world', 1);
1058
1059
+ eq('1hello{\n world\n', cm.getValue());
1060
+}, {value: '1234\n5678\nabcdefg\n'});
1061
+
1062
// Swapcase commands edit in place and do not modify registers.
1063
testVim('g~w_repeat', function(cm, vim, helpers) {
1064
// Assert that dw does delete newline if it should go to the next line, and
0 commit comments