You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
454 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. try {
  2. const vscode = require("vscode")
  3. const fs = require("fs")
  4. let start = vscode.window.activeTextEditor.document.lineCount
  5. let fileName = vscode.window.activeTextEditor.document.fileName
  6. console.log(start)
  7. console.log(fileName)
  8. var context = fs.readFileSync(fileName)
  9. var context_arr = context.split("\n")
  10. console.log(context)
  11. console.log(context_arr[start])
  12. } catch (error) {
  13. console.log(error)
  14. }