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.

21 lines
473 B

4 years ago
4 years ago
4 years ago
4 years ago
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. fs.readFile(fileName, function (context) {
  9. var context_arr = context.split("\n")
  10. console.log(context)
  11. console.log(context_arr[start])
  12. })
  13. } catch (error) {
  14. console.log(error)
  15. }