Skip to content

Commit

Permalink
Add support for gd for VSCodeVim#529
Browse files Browse the repository at this point in the history
This commit maps `gd` to VSCode's go to declaration action.
  • Loading branch information
jordanlewis committed Jul 27, 2016
1 parent a4a2002 commit 1ac1edb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,18 @@ class CommandExitVisualLineMode extends BaseCommand {
}
}

@RegisterAction
class CommandGoToDefinition extends BaseCommand {
modes = [ModeName.Normal]
keys = ["g", "d"]

public async exec(position: Position, vimState: VimState): Promise<VimState> {
vimState.focusChanged = true;
await vscode.commands.executeCommand("editor.action.goToDeclaration");
return vimState;
}
}

// begin insert commands

@RegisterAction
Expand Down

0 comments on commit 1ac1edb

Please sign in to comment.