Code Monkey home page Code Monkey logo

atom-timestamp's Introduction

atom-timestamp

Update timestamp comments like Time-stamp: <Jun 02 2006>, Time-stamp: <2006-01-02 15:04:05> to current date/time

This package uses Moment.js library for parsing/updating timestamp

Installation

Use apm command:

$ apm install atom-timestamp

or search for atom-timestamp in Atom.

Usage

Settings

  • Timestamp Prefix, Timestamp Suffix - Regular expression pattern for timestamp prefix/suffix.
  • Timestamp Formats - Format-string for parsing/updating timestamp. Use Moment.js format. Time zone tokens (z, zz) and localized formats (L, l, ...) do not work.
  • Scope Selector - Regular expression pattern for scope name in syntax. By default, atom-timestamp only works in comments in syntax or plain text file.
  • Number Of Lines - Number of lines from the beginning to search timestamp comments.

Commands

  • atom-timestamp:update-timestamp - Update timestamp comments to current date/time

atom-timestamp's People

Watchers

B.E. Henriksen avatar  avatar

Forkers

madastro

atom-timestamp's Issues

Feature request: Insert timestamp even if blank

I was expecting this plugin to behave like VS Code’s vscode-auto-timestamp, where even Time-stamp: populates with the current timestamp on save. It took me a long time to figure out that I needed to have something matching the Timestamp Formats—like Time-stamp: Jun 18 2019—in-between the Prefix and Suffix before it would update.

in link

prefix ?d=?
suffix $
format YYYY-MM-DD_HH:mm:ss
@import "base/global-base.css?2017-05-07_22:06:11";

not work, please help from work

Unable to update timestamp on Markdown files

Automatic timestamp updates work great on my other files (including latex, shell scripts, and many others), but fail on any Markdown files. I have checked in my Atom Settings my Timestamp Prefix, Suffix, and Formats regexp and format strings, but still no automatic update when I save the Markdown. I have even copied over the lines from those others (so I know they work and have been routinely updated there) into my Markdown files, but still no updates when I save the Markdown file.

Line in a Markdown file (at the top, line 3):

by Danny Quah, May 2020 // Last edited: 2020.05.23.1232h -- Danny Quah

(timestamp won't update; same if I delete the part leading up to //).

But line in a TeX file (at the top, line 3):

% Last edited: 2020.05.23.1322h -- Danny Quah

updates fine every time.

Must be something obvious I'm missing, but blindspotting right now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.