-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Easy date insert #115
Comments
What platforms do you use? I have this need as well for journaling, but I solve it across different apps using system-wide shortcuts. On iOS I have a handful of Shortcuts workflows for formatting the current date in different ways that lets me do it in any app by just swiping down, tapping a button, and then pasting. On MacOS I have a similar shortcut in Alfred that lets me quickly paste the date with just three or four keystrokes (and it would be easy to do it in a single keystroke). Windows has similar potential—I’ve heard of AutoHotKey before though I’ve never used it myself—and most Linux GUIs should make it similarly easy to set up a hotkey to a shell script that formats the date and copies it to the clipboard. |
Totally could knock up a rofi plugin for that on my laptop, my phone less so, unless I want to use one of the less privacy friendly android keyboards. But it would be nice to have a consistent approach between devices. |
Agreed. I would love to have a shortcut directly in cryptee - for journaling and work. |
Hello all! 👋🏻 Thanks a lot for filing this @jebbster88, and thanks a lot for chiming in everyone! While I can see that this would be incredibly useful, I'm not sure if there's a good way to implement this without causing confusion or internationalization issues.
More importantly, what if you want to type something like "Jack/Daisy"? or "jebbster/dhda"? Finally, date formatting in general is an international standardization nightmare ( April 21, 2021 written in different countries : in US : in France : in Finland : etc. Browsers help abstract a large part of this with date functions, and we even utilize browsers' built in date formatting for the new document input for example. But it only makes sense to use these if the user can see what the result will be when they type "/d" for example. Otherwise, you don't know which format the date will be outputted. is it the Apr 21, 2021, or April 21, 2021, or 04/21/2021 etc etc. So perhaps to solve all this, I could add an "insert date" hotkey, which opens a dropdown / popup just like the insert tag popup. You can open it with something like : "alt+shift+d" etc. The popup can have a pre-populated list of dates written in 4 - 5 most common formats using the browser's built in date locale. So a popup in US would look like : --
-- And once it's open you can use either the arrow keys or the number keys to select & insert one. How does this sound? Would love to know what you think, and whether if you have a better solution that works internationally. |
Would is be possible to store the date format in the settings? So you can choose from different formats and save this setting, like the other settings, on device. |
A date insertion menu would be perfect, however the problem with using a chord for the shortcut is that it would make it difficult to use on mobile (where its going to be most useful IMO), unless you're also envisioning another editor button for date? |
Is your feature request related to a problem? Please describe.
I have a document where I add an entry every day, with headers of the form
## Monday 15th Feb
, it got tedious entering the dates.Describe the solution you'd like
A shortcut for entering the current date similar to the markdown shortcuts. E.g.
Additional context
I took d and D as based on the .Net string formatting spec https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings
Could possibly take it even further and allow something like
/d"a format string"
but that seems like possible overkill.The text was updated successfully, but these errors were encountered: