Skip to content

Commit 62d1703

Browse files
committed
docs: update instructions
1 parent b157a42 commit 62d1703

File tree

3 files changed

+113
-40
lines changed

3 files changed

+113
-40
lines changed

README.md

+65-26
Original file line numberDiff line numberDiff line change
@@ -30,59 +30,98 @@
3030

3131
</div>
3232

33-
tdo.nvim is a `<utility/tool>` that allows `<target_audience>` to `<action>`.
33+
tdo.nvim integrates [tdo](https://github.com/2kabhishek/tdo) into your neovim workflow to make managing notes and todos super simple and fast.
3434

3535
## ✨ Features
3636

37-
- Comes with a ready to go README template
38-
- Works with [mkrepo](https://github.com/2kabhishek/mkrepo)
37+
- All features provided by [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-features)
38+
- Various commands to make working with tdo seamless
39+
- Todo navigation and toggle helpers
40+
- Integration with telescope for easy notes searching
3941

4042
## ⚡ Setup
4143

4244
### ⚙️ Requirements
4345

44-
- foo >= bar
45-
- bazz
46+
- neovim
4647

4748
### 💻 Installation
4849

49-
Installing tdo.nvim is as simple as cloning and symlinking!
50+
Add the following to your lazy/packer config
5051

5152
```bash
52-
git clone https://github.com/2kabhishek/tdo.nvim
53-
cd tdo.nvim
54-
<install_command>
53+
-- Lazy
54+
{
55+
'2kabhishek/tdo.nvim',
56+
dependencies = { 'stevearc/dressing.nvim', 'nvim-telescope/telescope.nvim' },
57+
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle' 'TdoFind', 'TdoFiles' },
58+
keys = { '[t', ']t' },
59+
},
60+
61+
-- Packer
62+
use '2kabhishek/tdo.nvim'
5563
```
5664
5765
## 🚀 Usage
5866
59-
```bash
60-
USAGE:
61-
tdo.nvim [FLAGS] [OPTIONS]
62-
Example:
63-
tdo.nvim
64-
```
67+
### 📡 Commands
6568
66-
## 🏗️ What's Next
69+
`tdo.nvim` adds the following commands:
70+
71+
- `Tdo <args>`: open today's todo when no `args`, accepts `args` same as [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-usage)
72+
- `TdoEntry <offset>`: open today's journal entry, accepts `offset`
73+
- `TdoNote`: create new note with title, if left empty creates a draft with current timestamp
74+
- `TdoPending`: show all your pending todos
75+
- `TdoToggle`: toggle todo state
76+
- `TdoFind <text>`: interactively search for `text` in all your notes
77+
- `TdoFiles`: review all your notes
78+
79+
### ⌨️ Mappings
80+
81+
`tdo.nvim` adds the following mappings:
6782
68-
Planning to add `<feature/module>`.
83+
- <kbd>[t</kbd> / <kbd>]t</kbd> — Go to previous/next todo `[ ]`
6984
70-
### ✅ To-Do
85+
#### Recommended which-key Mappings
86+
87+
Other than the standard commands, you can use which-key to create your own commands.
88+
89+
I have defined commands for yesterday/tomorrow's todos, commit note and timestamp insertion.
90+
91+
```lua
92+
n = {
93+
name = 'Notes',
94+
d = { '<cmd>Tdo<cr>', "Today's Todo" },
95+
e = { '<cmd>TdoEntry<cr>', "Today's Entry" },
96+
f = { '<cmd>TdoFiles<cr>', 'All Notes' },
97+
g = { '<cmd>TdoFind<cr>', 'Find Notes' },
98+
h = { '<cmd>Tdo -1<cr>', "Yesterday's Todo" },
99+
j = { "<cmd>put =strftime('%a %d %b %r')<cr>", 'Insert Human Date' },
100+
J = { "<cmd>put =strftime('%F')<cr>", 'Insert Date' },
101+
k = { "<cmd>put =strftime('%r')<cr>", 'Insert Human Time' },
102+
K = { "<cmd>put =strftime('%F-%H-%M')<cr>", 'Insert Time' },
103+
l = { '<cmd>Tdo 1<cr>', "Tomorrow's Todo" },
104+
n = { '<cmd>TdoNote<cr>', 'New Note' },
105+
s = { '<cmd>lua require("tdo").run_with("commit " .. vim.fn.expand("%:p")) vim.notify("Commited!")<cr>', 'Commit Note', },
106+
t = { '<cmd>TdoPending<cr>', 'Pending Todos' },
107+
x = { '<cmd>TdoToggle<cr>', 'Toggle Todo' },
108+
},
109+
```
110+
111+
## 🏗️ What's Next
71112
72-
- [x] Setup repo
73-
- [ ] Think real hard
74-
- [ ] Start typing
113+
You tell me!
75114
76115
## 🧑‍💻 Behind The Code
77116
78117
### 🌈 Inspiration
79118
80-
tdo.nvim was inspired by `<reason/idea>`.
119+
Most note-taking systems offer a lot more than I needed, so I wrote [tdo](https://github.com/2kabhishek/tdo) and then tdo.nvim for better integration.
81120
82121
### 💡 Challenges/Learnings
83122
84-
- The main challenges were `<issue/difficulty>`
85-
- I learned about `<learning/accomplishment>`
123+
- Dove deeper into nvim APIs
124+
- Learned about not interactive shell scripting.
86125
87126
### 🧰 Tooling
88127
@@ -93,8 +132,8 @@ tdo.nvim was inspired by `<reason/idea>`.
93132
94133
### 🔍 More Info
95134
96-
- [shelly](https://github.com/2kabhishek/shelly)Command line template
97-
- [tiny-web](https://github.com/2kabhishek/tiny-web)Web app template
135+
- [co-author.nvim](https://github.com/2kabhishek/co-author.nvim) — Easily add git co authors
136+
- [nerdy.nvim](https://github.com/2kabhishek/nerdy.nvim) — Easily add nerd glyphs
98137
99138
<hr>
100139

doc/tdo.nvim.txt

+48-14
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,78 @@ TABLE OF CONTENTS *tdo.nvim.toc*
77
================================================================================
88
INTRODUCTION *tdo.nvim*
99

10-
This plugin works with tdo to help you better manage your notes
10+
tdo.nvim integrates [tdo](https://github.com/2kabhishek/tdo) into your neovim workflow to make managing notes and todos super simple and fast.
11+
12+
Features
13+
14+
- All features provided by [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-features)
15+
- Various commands to make working with tdo seamless
16+
- Todo navigation and toggle helpers
17+
- Integration with telescope for easy notes searching
1118

1219
================================================================================
1320
QUICKSTART *tdo-quickstart*
1421

15-
Add the following to you lazy/packer config
22+
Add the following to your lazy/packer config
1623

17-
>
24+
```bash
1825
-- Lazy
1926
{
2027
'2kabhishek/tdo.nvim',
2128
dependencies = { 'stevearc/dressing.nvim', 'nvim-telescope/telescope.nvim' },
22-
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle' 'TdoFind',
23-
'TdoFiles', 'TdoYesterday', 'TdoTomorrow' },
29+
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle' 'TdoFind', 'TdoFiles' },
2430
keys = { '[t', ']t' },
2531
},
2632

2733
-- Packer
2834
use '2kabhishek/tdo.nvim'
29-
<
35+
```
3036

3137
================================================================================
3238
COMMANDS *tdo-commands*
3339

34-
Tdo adds the following commands:
40+
`tdo.nvim` adds the following commands:
3541

36-
'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle' 'TdoFind',
37-
'TdoFiles', 'TdoYesterday', 'TdoTomorrow'
38-
>
39-
:Tdo 1
40-
<
42+
- `Tdo <args>`: open today's todo when no `args`, accepts `args` same as [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-usage)
43+
- `TdoEntry <offset>`: open today's journal entry, accepts `offset`
44+
- `TdoNote`: create new note with title, if left empty creates a draft with current timestamp
45+
- `TdoPending`: show all your pending todos
46+
- `TdoToggle`: toggle todo state
47+
- `TdoFind <text>`: interactively search for `text` in all your notes
48+
- `TdoFiles`: review all your notes
4149

4250
================================================================================
4351
MAPPINGS *tdo-mappings*
4452

45-
tdo adds the following mappings:
53+
`tdo.nvim` adds the following mappings:
54+
55+
- [t / ]t — Go to previous/next todo `[ ]`
56+
57+
Recommended which-key Mappings
4658

47-
- [t / ]t - Go to previous/next todo `[ ]`
59+
Other than the standard commands, you can use which-key to create your own commands.
60+
61+
I have defined commands for yesterday/tomorrow's todos, commit note and timestamp insertion.
62+
63+
```lua
64+
n = {
65+
name = 'Notes',
66+
d = { '<cmd>Tdo<cr>', "Today's Todo" },
67+
e = { '<cmd>TdoEntry<cr>', "Today's Entry" },
68+
f = { '<cmd>TdoFiles<cr>', 'All Notes' },
69+
g = { '<cmd>TdoFind<cr>', 'Find Notes' },
70+
h = { '<cmd>Tdo -1<cr>', "Yesterday's Todo" },
71+
j = { "<cmd>put =strftime('%a %d %b %r')<cr>", 'Insert Human Date' },
72+
J = { "<cmd>put =strftime('%F')<cr>", 'Insert Date' },
73+
k = { "<cmd>put =strftime('%r')<cr>", 'Insert Human Time' },
74+
K = { "<cmd>put =strftime('%F-%H-%M')<cr>", 'Insert Time' },
75+
l = { '<cmd>Tdo 1<cr>', "Tomorrow's Todo" },
76+
t = { '<cmd>TdoPending<cr>', 'Pending Todos' },
77+
n = { '<cmd>TdoNote<cr>', 'New Note' },
78+
s = { '<cmd>lua require("tdo").run_with("commit " .. vim.fn.expand("%:p")) vim.notify("Commited!")<cr>', 'Commit Note', },
79+
x = { '<cmd>TdoToggle<cr>', 'Toggle Todo' },
80+
},
81+
```
4882

4983
================================================================================
5084

images/screenshot.jpg

44.5 KB
Loading

0 commit comments

Comments
 (0)