Skip to content

Commit

Permalink
[vim mode] Fix Backspace in replace mode...
Browse files Browse the repository at this point in the history
and remove autocomplete bindings
  • Loading branch information
mightyguava authored and marijnh committed Jun 26, 2016
1 parent 2319665 commit 54d0d82
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions keymap/vim.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
{ keys: '<Down>', type: 'keyToKey', toKeys: 'j' },
{ keys: '<Space>', type: 'keyToKey', toKeys: 'l' },
{ keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},
{ keys: '<BS>', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }, context: 'insert'},
{ keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },
{ keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },
{ keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },
Expand Down Expand Up @@ -4771,21 +4772,13 @@
CodeMirror.keyMap['vim-insert'] = {
// TODO: override navigation keys so that Esc will cancel automatic
// indentation from o, O, i_<CR>
'Ctrl-N': 'autocomplete',
'Ctrl-P': 'autocomplete',
'Enter': function(cm) {
var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
CodeMirror.commands.newlineAndIndent;
fn(cm);
},
fallthrough: ['default'],
attach: attachVimMap,
detach: detachVimMap,
call: cmKey
};

CodeMirror.keyMap['vim-replace'] = {
'Backspace': 'goCharLeft',
fallthrough: ['vim-insert'],
attach: attachVimMap,
detach: detachVimMap,
Expand Down

0 comments on commit 54d0d82

Please sign in to comment.