diff --git a/src/Actions/Navigation.ts b/src/Actions/Navigation.ts new file mode 100644 index 00000000..ddfa576b --- /dev/null +++ b/src/Actions/Navigation.ts @@ -0,0 +1,13 @@ +import {commands} from 'vscode'; + +export class ActionNavigation { + + static goToDeclaration(): Thenable { + return commands.executeCommand('editor.action.goToDeclaration'); + } + + static goToTypeDefinition(): Thenable { + return commands.executeCommand('editor.action.goToTypeDefinition'); + } + +} diff --git a/src/Modes/Normal.ts b/src/Modes/Normal.ts index e86a4f7b..37a53b51 100644 --- a/src/Modes/Normal.ts +++ b/src/Modes/Normal.ts @@ -26,6 +26,7 @@ import {ActionFold} from '../Actions/Fold'; import {ActionCommandLine} from '../Actions/CommandLine'; import {MotionCharacter} from '../Motions/Character'; import {MotionLine} from '../Motions/Line'; +import { ActionNavigation } from '../Actions/Navigation'; export class ModeNormal extends Mode { @@ -217,6 +218,9 @@ export class ModeNormal extends Mode { { keys: '< <', actions: [ActionIndent.decrease] }, { keys: '> >', actions: [ActionIndent.increase] }, + { keys: 'g d', actions: [ActionNavigation.goToDeclaration] }, + { keys: 'g D', actions: [ActionNavigation.goToTypeDefinition] }, + { keys: '/', actions: [ActionFind.focusFindWidget] }, { keys: 'v', actions: [ActionMode.toVisual] },