Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97355

get currently focus file via VSCode extension API?

$
0
0

There is the steps.

  1. select a file or directory in workspaces.
  2. exec command via keybindings.
  3. get the selected file or directory path in command handler.

Command handler

vscode.commands.registerCommand('extension.myExtension', function (event) {
  // event is undefined.
  // how to do in here?
})

Viewing all articles
Browse latest Browse all 97355

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>