Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013: How to add file name to the output of a snippet?

I need to include the name of the file that the snippet is being inserted to the output. I looked into Code Snippet Functions (http://msdn.microsoft.com/en-us/library/ms242312%28v=vs.80%29.aspx) and the selections are limited.

Is there any way to insert the name of the file that the snippet is being inserted into to the snippet output?

like image 920
Allan Xu Avatar asked Mar 07 '14 20:03

Allan Xu


1 Answers

You can add ${1:${TM_FILENAME_BASE}} tag in json snippet file to get file name and add it to output of snippet.

like image 137
Davood V Avatar answered Sep 23 '22 15:09

Davood V