Is there a way to link it with Git, like in VSCode, to know the corresponding time for that sentence?
Unless someone writes a plugin with this kind of functionality, no.
I reckon there might be some commentator or comments plugin out there that might put a time stamp with comments, but you’d probably need to write stuff twice in the document: once for the body and another time for the plugin.
-
File recovery core plugin
-
Obsidian Git: Use this plugin to back up your vault by committing its contents to a GitHub repository. It’s an effective way to version control your notes and ensure their safety on a remote server. However, please be aware that your data will be stored on Github using this method.
-
Local Backup: This plugin allows you to create local copies of your vault in a folder of your choice, with options for archival. You can even use a syncing folder, like a Dropbox folder, to combine local and cloud backups. This method pairs well with the backup options described below.
https://help.obsidian.md/Getting+started/Back+up+your+Obsidian+files
Hey, I found a way to enable Line author information in Obsidian Git. I’m also curious if there are other methods.
Thank you very much for your reply. However, I want to know when this sentence was written. The git + Line author information above provides one method. But I am curious if there are other methods (Obsidian plugins) that can show, for example, what content I edited in which files at different times of the day, preferably in a flow process display.
You could write your sentence in a single note. I recommend to save date and time of creation to yaml property, for file.cdate may change over time by certain file system operations.
Edit: Also the sync function provides version control within a file.
But if you want git functionality, maybe just use git for your needs…
You can use the Natural Language Dates plugin with date format YYYYMMDDTHH:mm:ss
. You press @
and choose today and it adds the timestamp at cursor position.
In Obsidian you can use Javascript – easiest to use a Templater snippet.
Again, this snippet adds a timestamp at cursor position:
<%*
let timestamp = moment().format("YYYYMMDDTHHmmss");
tR += `^${timestamp}`;
%>
Add your template or snippet folder in Templater settings and register the template for a hot key shortcut in Templater.
- That’s TemplateR with an R at the end.
You can remove the ^
before ${timestamp}
. I only added it for cosmetic effect, not so much for block id creating reasons, although this can be handy (but too many block id’s are taxing on the metadatacache in the long run).
You can use small html tags for cosmetics:
<%*
let timestamp = moment().format("YYYYMMDDTHHmmss");
tR += `<small>${timestamp}</small>`;
%>
Differences:
In Reading Mode, the small tagged version shows, the block-id version doesn’t, which is a plus.
You can change the date-time format any way you like. You can add hyphens in the time-date format: makes it easier to query them in the search modal (with regex).
But as I said, I’d rather like a plugin solution, similar to what the Remember Cursor Position plugin does: writes stuff into a data.json file. If I wanted something like this for myself, I’d rather not clutter up my notes with these timestamps and I may miss adding them from time to time, which means relying on finding anything based on these would be impossible for me.
So as I said, keep looking for the plugins mentioned.
One of them:
The other was also named Comments or something. No idea what they do and how likely they are to break…anything…
The core Templates plugin can also provide the date, time, or a custom template (assigned to Hotkeys).
{{date:YYYY-MM-DD}}T{{time:HH:mm}},
- {{date:YYYY-MM-DD}}T{{time:HH:mm}},
- %%{{date:YYYY-MM-DD}}T{{time:HH:mm}}%%,
Thank you for taking the time to reply! Very good suggestions! I will give them a try. I am currently using similar methods. One is to save every 20 seconds through git, but I haven’t found a good git software that can show my editing process (for example, they can only show the file differences between the start and end nodes). Using the Line author information in git-obsidian, it can only display a single file. However, I often write something in file A, then in file B and file C, so I can’t record my editing process, which is related to my inspiration. The other method is to input the date through the shortcut operation of the input method. I will try to replace it with your method.
So my current editing situation is like this: I will edit some content in file A, then edit some content in file B, then edit some content in file C, and then possibly move on to other files. Because they are different knowledge points but have similarities. I hope there is a plugin that can record my editing process in different files (the content might need to be more complex if linked with git, but simply recording how many words I edited and when I edited them would be sufficient)
Thank you for your reply. However, it seems that this plugin does not support canvas cards well and cannot be used in canvas cards. I have previously used canvas to display the relationships between different files, but if the files are very large and long, it becomes less intuitive.
I do believe your way forward would be to use git, one way or another. It allows you to track changes within a file and/or vault, and using it log tools you can display sequential changes over time or between versions. This can be done per file, or a given folder structure.
I might change to using a trigger to do the git commit
though instead of a time interval, which would allow you to determine what constitutes as a significant change. And then you can use git log
to see those changes over time, or use git blame
to look at a given file and see when that sentence was changed lastly (and by whom which I reckon would only be you in this case).