Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Chillee committed May 26, 2017
1 parent abbd98c commit 28950d5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
{
"key": "tab",
"command": "extension.vim_tab",
"when": "editorFocus && vim.active && vim.mode == 'Normal' && !inDebugRepl"
"when": "editorFocus && vim.active && !suggestWidgetVisible && !inDebugRepl"
},
{
"key": "ctrl+r",
Expand Down
1 change: 1 addition & 0 deletions src/actions/commands/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class DocumentContentChangeAction extends BaseAction {
}[] = [];

public async exec(position: Position, vimState: VimState): Promise<VimState> {

if (this.contentChanges.length === 0) {
return vimState;
}
Expand Down
27 changes: 13 additions & 14 deletions src/actions/commands/insert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,20 +182,19 @@ class CommandInsertIndentInCurrentLine extends BaseCommand {
}
}

// This breaks tab completion: See https://github.com/VSCodeVim/Vim/issues/1752
// @RegisterAction
// export class CommandInsertTabInInsertMode extends BaseCommand {
// modes = [ModeName.Insert];
// keys = ["<tab>"];
// runsOnceForEveryCursor() { return false; }

// public async exec(position: Position, vimState: VimState): Promise<VimState> {
// vimState.recordedState.transformations.push({
// type: "tab"
// });
// return vimState;
// }
// }
@RegisterAction
export class CommandInsertTabInInsertMode extends BaseCommand {
modes = [ModeName.Insert];
keys = ["<tab>"];
runsOnceForEveryCursor() { return false; }

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.recordedState.transformations.push({
type: "tab"
});
return vimState;
}
}

@RegisterAction
export class CommandInsertInInsertMode extends BaseCommand {
Expand Down
13 changes: 6 additions & 7 deletions test/mode/normalModeTests/motions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,12 @@ suite("Motions in Normal Mode", () => {
end: ['!one', '!two', '|!three']
});

// https://github.com/VSCodeVim/Vim/pull/1753
// newTest({
// title: "Can handle dot with I with tab",
// start: ['on|e', 'two', 'three'],
// keysPressed: 'I<tab><Esc>j.j.',
// end: [' one', ' two', ' | three']
// });
newTest({
title: "Can handle dot with I with tab",
start: ['on|e', 'two', 'three'],
keysPressed: 'I<tab><Esc>j.j.',
end: [' one', ' two', ' | three']
});

newTest({
title: "Can handle 0",
Expand Down

0 comments on commit 28950d5

Please sign in to comment.