7

Thank you for reading my question.

I want to customize my Xcode snippet library.

I've read this article. http://www.icodeblog.com/2011/12/06/using-xcode-4-snippets/

Now I want to customize my comment that insert date(today) automatically after my comment text.

ex:

//This is my comment --- 2012/05/15

The date(2012/05/15) is automatically generate by Xcode.

Is this possible thing?

P.S. My Xcode version is 4.3.2

Thank you.

Midhun MP
  • 103,496
  • 31
  • 153
  • 200
wei
  • 4,267
  • 2
  • 23
  • 18
  • did you get the answer or any solution. Please post it here. Thanks in advance. – Nikh1414 Feb 10 '16 at 13:11
  • Hi Nikh141, unfortunately I haven't found any good enough solution for me. Check this link:http://stackoverflow.com/questions/15745605/add-time-and-date-in-custom-user-code-snippet-in-xcode It may be helpful for you. – wei Feb 21 '16 at 12:47
  • The link in the article no longer works. I think it's a good idea to edit the question in case there are new solutions for this. – Farini May 11 '17 at 16:11

1 Answers1

0

As a snippet? Not possible. However, you can easily create a Service in Automator that calls date +%Y-%m-%d.

Rudolf Adamkovič
  • 31,030
  • 13
  • 103
  • 118