How to insert date and also how to underline text?


#1

From what I’ve read I don’t believe there is a way to enter the current date with a snippet. I found the snippet below, but it does not work.

Also, what is the easiest way to underline text in a text file?

‘.text.plain’:
‘Header’:
‘prefix’: ‘theader’
‘body’: ‘My name - $date’
‘variables’:
‘date’: ‘’‘
require moment
moment().format(“YYYY-MM-DD”)
’’’


How to underline text in Atom?
#2

There’s nothing in the snippets documentation about a variables key. I’m not sure where you got that from.

Also, what is the easiest way to underline text in a text file?

In what format? Markdown?


#3

Not Markdown, I just want to underline text in a plain text file.

-Thanks


#4

as an annotation ? i’m not sure it’s possible.

plain in “plain text” file mean no formatting metadata, just the text.

underline is a formatting metadata.

(Edit: Unless your text follow a pattern then it’s possible to decorate it using a grammar and DamnedScholar is steering you in the right direction)


#5

What text? Syntax styles are determined by the language grammar and the syntax theme, and you could use a styles.less rule to target variables or a specific sort of function. It’s also possible to add a decoration to specific text, as with the pigments or find-and-replace packages.


#6

I have the key mapping shown below for vim. I place the cursor on a line of text, press C-u, and it is underlined.

"Underline text
map yypVr-


#7

You can look at the packages I linked to and develop a package for underlining text based on those.