2

I have the following snippet for the .cpp files.

/**
 *    author:  kartikPant23
 *    created: `!v strftime("%d.%m.%y %H:%M:%S")`
**/

#include <btis/stdc++.h>
using namespace std;
int main () {
    $1
    return 0;
}

The problem here is that timestamp provided by !v strftime("%d.%m.%y %H:%M:%S") keeps changing as I move the cursor around or even if type something.

Expected Behavior - I want that the timestamp should have the time when I created the file, and it should not keep updating. \ I am new to Vim(Neovim) and cannot understand reason for this strange behavior.

  • I got the answer, insted $1 we have to $0. Exact description can be found [here](https://github.com/SirVer/ultisnips/issues/1410#issuecomment-968893195). – Kartik Pant Nov 20 '21 at 08:39

0 Answers0