diff --git a/package.json b/package.json index faf2feb64..3897d3691 100644 --- a/package.json +++ b/package.json @@ -453,6 +453,11 @@ "category": "R", "command": "r.names" }, + { + "title": "View selected object", + "category": "R", + "command": "r.view" + }, { "title": "Create gitignore", "category": "R", diff --git a/src/extension.ts b/src/extension.ts index 349a592a1..1f816d367 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -69,6 +69,7 @@ export async function activate(context: vscode.ExtensionContext): Promise rTerminal.runSelectionOrWord(['head']), 'r.thead': () => rTerminal.runSelectionOrWord(['t', 'head']), 'r.names': () => rTerminal.runSelectionOrWord(['names']), + 'r.view': () => rTerminal.runSelectionOrWord(['View']), 'r.runSource': () => { void rTerminal.runSource(false); }, 'r.runSelection': (code?: string) => { code ? void rTerminal.runTextInTerm(code) : void rTerminal.runSelection(); }, 'r.runFromLineToEnd': rTerminal.runFromLineToEnd,