Comments (8)
Oh yeah, I absolutely agree! Currently there’s a bigger refactoring on-going which will make this easier.
So, it’ll happen, but not very soon.
Not quite sure about the due:
completion though; since it’s very dynamic what you could write there (2022-02-02
, +4d
, tue
, +1y2w-2d
) it would almost require a calendar selection, but even that wouldn’t quite cut it.
Any ideas?
from pter.
One is idea is to make an option to specify the date format, and use it as the basis of converting to/from.
In khal, for example, you can set the format for both the short date and the long date. I have the following in my ~/.config/khal/config
:
[locale]
timeformat = %H:%M
dateformat = %m.%d.
longdateformat = %Y-%m-%d
datetimeformat = %Y-%m-%d %H:%M
longdatetimeformat = %Y-%m-%d %H:%M
So, maybe pter could detect that if I started writing due:2021
and I have %Y-%m-%d
configured as the format, so pressing tab could complete the date as due:2021-10-17
.
from pter.
Not quite sure how it would complete the date though, if I only type due:2021
and Tab… would it show a completion option for month and day?
Just curious: are you using absolute dates in due:
and t:
more often than relative dates? I keep finding myself rather settings tasks up to be at due:sat
or due:+1w
.
from pter.
if I only type
due:2021
and Tab… would it show a completion option for month and day?
Actually, I was only thinking of completing the current date, but I understand that not everyone would find it adequate.
So, another option would be to print out the current date in a specified format (such as %Y-%m-%d
), and create highlighted tab stops for each number (so pressing tab highlights the month, pressing it again highlights the day etc.), which could be increased/decreased with the arrow keys or overwritten if a number was pressed.
Just curious: are you using absolute dates in
due:
andt:
more often than relative dates? I keep finding myself rather settings tasks up to be atdue:sat
ordue:+1w
.
Yes, I prefer absolute dates. I think the main reason is that they are easier to be parsed by scripts. (I have a Polybar script that notifies me if I have tasks due today.)
from pter.
Ah, that was maybe a misunderstanding. I gotta check the documentation whether it's not clear enough.
When editing tasks, you can enter a relative date, for example, due:0
(meaning: due in +0 days, i.e. today), but the todo.txt standard does not actually allow for relative dates. Instead pter will save the date as an absolute date!
So, if I add a task in pter today, like Add autocompletion to contexts in +pter due:+1w
, pter will expand the due:
tag to due:2021-10-25
-- i.e. 1 week (7 days) from now.
Have a look at the section on relative dates in the documentation!
Would this alleviate the need to have autocompletion for the t:
and due:
tags?
Obviously the +
and @
fields need autocompletion though.
from pter.
When editing tasks, you can enter a relative date, for example,
due:0
(meaning: due in +0 days, i.e. today), but the todo.txt standard does not actually allow for relative dates. Instead pter will save the date as an absolute date!So, if I add a task in pter today, like
Add autocompletion to contexts in +pter due:+1w
, pter will expand thedue:
tag todue:2021-10-25
-- i.e. 1 week (7 days) from now.Have a look at the section on relative dates in the documentation!
Oh, I didn't know pter has this feature. Very useful! (And I'll keep reading the documentation. :))
Would this alleviate the need to have autocompletion for the
t:
anddue:
tags?
Yes, absolutely! (As far as I'm concerned.)
from pter.
Autocompletion is implemented in 2.1.0.
I was a bit too eager to push it out of the door, so the documentation is not great (i.e. missing). It’ll come later.
For now: Tab, ^N
, and arrow key down will select the next available option, ^P
, and arrow key up will select the previous option. Enter
is used to select the completion option, Esc
and ^C
will close the completion box.
Completion works for contexts (@
) and projects (+
).
from pter.
Thank you very much!
from pter.
Related Issues (20)
- Commands to increase/decrease due dates HOT 11
- Distraction-free task editing/creation HOT 3
- Patch for help screen HOT 5
- Mouse-wheel scrolling broken after editing a task externally HOT 38
- Patch to fix caret key issues HOT 1
- Patch to improve line editing some more HOT 6
- Patch: UI proofreading/minor editing HOT 7
- Patch to invert completion highlighting HOT 2
- Helpbar improvements (configurable hints and key sorting) HOT 23
- Regression: pter crashes when choosing a filename to save the task to HOT 1
- Distraction-free mode should show task list on "jump-to" action HOT 6
- Bug: chained keybindings do not seem to work on the Help screen HOT 20
- What does "N" (edit note) do? HOT 6
- Request: Add filename in task format? HOT 13
- Add file name completion when searching HOT 8
- Bug: Editor keybindings not dumped? HOT 2
- Centralised archive with multiple todo.txt file HOT 1
- Support for different sources of tasks
- qpter not finding PyQt5 under python3 (No longer easily available under pip install) HOT 4
- new qpter issue (at least on my end!) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pter.