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

How to increment a variable, like the line number, in a vscode snippet

$
0
0

I have a multi-line snippet in VScode. The problem is, TM_LINE_NUMBER gives the number of the line where the snippet was triggered, I need to increase that number by 1 so it equals the line number that it is actually on.

"Console_Log_Test": {
  "prefix": "clg",
  "body": [
    "//Debugging (remove)",
    "console.log('Line #${TM_LINE_NUMBER}');"
  ]
},

How can I do that?


Viewing all articles
Browse latest Browse all 99078

Trending Articles