Skip to content

Commit

Permalink
feat!: rename TdoPending to TdoTodos
Browse files Browse the repository at this point in the history
  • Loading branch information
2KAbhishek committed Feb 8, 2024
1 parent b735642 commit aa13bc9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Add the following to your lazy/packer config
{
'2kabhishek/tdo.nvim',
dependencies = 'nvim-telescope/telescope.nvim',
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle', 'TdoFind', 'TdoFiles' },
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoTodos', 'TdoToggle', 'TdoFind', 'TdoFiles' },
keys = { '[t', ']t' },
},

Expand All @@ -73,7 +73,7 @@ Add the following to your lazy/packer config
- `Tdo <args>`: open today's todo when no `args`, accepts `args` same as [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-usage)
- `TdoEntry <offset>`: open today's journal entry, accepts `offset`
- `TdoNote`: create new note with title, if left empty creates a draft with current timestamp
- `TdoPending`: show all your pending todos
- `TdoTodos`: show all your incomplete todos
- `TdoToggle`: toggle todo state
- `TdoFind <text>`: interactively search for `text` in all your notes
- `TdoFiles`: review all your notes
Expand Down Expand Up @@ -105,7 +105,7 @@ I have defined commands for yesterday/tomorrow's todos, commit note and timestam
l = { '<cmd>Tdo 1<cr>', "Tomorrow's Todo" },
n = { '<cmd>TdoNote<cr>', 'New Note' },
s = { '<cmd>lua require("tdo").run_with("commit " .. vim.fn.expand("%:p")) vim.notify("Commited!")<cr>', 'Commit Note', },
t = { '<cmd>TdoPending<cr>', 'Pending Todos' },
t = { '<cmd>TdoTodos<cr>', 'Incomplete Todos' },
x = { '<cmd>TdoToggle<cr>', 'Toggle Todo' },
},
```
Expand Down
6 changes: 3 additions & 3 deletions doc/tdo.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Add the following to your lazy/packer config
{
'2kabhishek/tdo.nvim',
dependencies = 'nvim-telescope/telescope.nvim',
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoPending', 'TdoToggle', 'TdoFind', 'TdoFiles' },
cmd = { 'Tdo', 'TdoEntry', 'TdoNote', 'TdoTodos', 'TdoToggle', 'TdoFind', 'TdoFiles' },
keys = { '[t', ']t' },
},

Expand All @@ -50,7 +50,7 @@ COMMANDS *tdo-commands*
- `Tdo <args>`: open today's todo when no `args`, accepts `args` same as [tdo](https://github.com/2kabhishek/tdo?tab=readme-ov-file#-usage)
- `TdoEntry <offset>`: open today's journal entry, accepts `offset`
- `TdoNote`: create new note with title, if left empty creates a draft with current timestamp
- `TdoPending`: show all your pending todos
- `TdoTodos`: show all your incomplete todos
- `TdoToggle`: toggle todo state
- `TdoFind <text>`: interactively search for `text` in all your notes
- `TdoFiles`: review all your notes
Expand Down Expand Up @@ -81,7 +81,7 @@ I have defined commands for yesterday/tomorrow's todos, commit note and timestam
k = { "<cmd>put =strftime('%r')<cr>", 'Insert Human Time' },
K = { "<cmd>put =strftime('%F-%H-%M')<cr>", 'Insert Time' },
l = { '<cmd>Tdo 1<cr>', "Tomorrow's Todo" },
t = { '<cmd>TdoPending<cr>', 'Pending Todos' },
t = { '<cmd>TdoTodos<cr>', 'Incomplete Todos' },
n = { '<cmd>TdoNote<cr>', 'New Note' },
s = { '<cmd>lua require("tdo").run_with("commit " .. vim.fn.expand("%:p")) vim.notify("Commited!")<cr>', 'Commit Note', },
x = { '<cmd>TdoToggle<cr>', 'Toggle Todo' },
Expand Down
4 changes: 2 additions & 2 deletions lua/tdo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ tdo.pending_todos = function()
local results = vim.fn.systemlist('tdo todo')

require('telescope.pickers').new({}, {
prompt_title = 'Find in todos',
results_title = 'Pending Todos',
prompt_title = 'Find in Todos',
results_title = 'Incomplete Todos',
finder = require('telescope.finders').new_table({
results = results,
entry_maker = require('telescope.make_entry').gen_from_file(),
Expand Down
2 changes: 1 addition & 1 deletion plugin/tdo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vim.api.nvim_create_user_command('TdoEntry', function(input)
end, { nargs = '*' })

vim.api.nvim_create_user_command('TdoNote', 'lua require("tdo").new_note()', {})
vim.api.nvim_create_user_command('TdoPending', 'lua require("tdo").pending_todos()', {})
vim.api.nvim_create_user_command('TdoTodos', 'lua require("tdo").pending_todos()', {})
vim.api.nvim_create_user_command('TdoToggle', 'lua require("tdo").toggle_todo()', {})
vim.api.nvim_create_user_command('TdoFind', 'lua require("tdo").find_note()', {})
vim.api.nvim_create_user_command('TdoFiles', 'lua require("tdo").all_notes()', {})
Expand Down

0 comments on commit aa13bc9

Please sign in to comment.