Skip to content

Commit 54d0d82

Browse files
mightyguavamarijnh
authored andcommitted
[vim mode] Fix Backspace in replace mode...
and remove autocomplete bindings
1 parent 2319665 commit 54d0d82

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

keymap/vim.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
{ keys: '<Down>', type: 'keyToKey', toKeys: 'j' },
5454
{ keys: '<Space>', type: 'keyToKey', toKeys: 'l' },
5555
{ keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},
56+
{ keys: '<BS>', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }, context: 'insert'},
5657
{ keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },
5758
{ keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },
5859
{ keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },
@@ -4771,21 +4772,13 @@
47714772
CodeMirror.keyMap['vim-insert'] = {
47724773
// TODO: override navigation keys so that Esc will cancel automatic
47734774
// indentation from o, O, i_<CR>
4774-
'Ctrl-N': 'autocomplete',
4775-
'Ctrl-P': 'autocomplete',
4776-
'Enter': function(cm) {
4777-
var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
4778-
CodeMirror.commands.newlineAndIndent;
4779-
fn(cm);
4780-
},
47814775
fallthrough: ['default'],
47824776
attach: attachVimMap,
47834777
detach: detachVimMap,
47844778
call: cmKey
47854779
};
47864780

47874781
CodeMirror.keyMap['vim-replace'] = {
4788-
'Backspace': 'goCharLeft',
47894782
fallthrough: ['vim-insert'],
47904783
attach: attachVimMap,
47914784
detach: detachVimMap,

0 commit comments

Comments
 (0)