A simple Neovim plugin that makes working with lists a breeze! Whether you’re taking notes, making TODOs, or organizing your thoughts, this plugin helps you manage different types of lists with minimal effort.
While this plugin was designed to complement nvim-orgmode, it works perfectly fine as a standalone plugin for managing lists in any text file.
- List Type Cycling: Quickly switch between different list formats:
- Plain text
- Bullet points (-)
- Numbered lists (1., 2., etc.)
- Checkboxes ([X])
- Smart Checkbox Management:
- Toggle checkboxes with a single keybind
- Parent checkboxes automatically update based on their children’s state
- Partial completion states ([-]) for nested lists
- Repeatable actions using vim-repeat (press . to repeat)
{
"hamidi-dev/org-list.nvim",
dependencies = {
"tpope/vim-repeat", -- for repeatable actions with '.'
},
config = function()
require("org-list").setup({
-- your config here (optional)
})
end
}
use {
"hamidi-dev/org-list.nvim",
requires = {
"tpope/vim-repeat", -- for repeatable actions with '.'
},
config = function()
require("org-list").setup()
end
}
The plugin works out of the box with sensible defaults, but you can customize it to your liking:
require("org-list").setup({
mapping = {
key = "<leader>lt", -- nvim-orgmode users: you might want to change this to <leader>olt
desc = "Toggle: Cycle through list types"
},
checkbox_toggle = {
enabled = true,
key = "<C-Space>", -- Change the checkbox toggle key
desc = "Toggle checkbox state",
filetypes = { "org", "markdown" } -- Add more filetypes as needed
}
})
- Place your cursor anywhere in a list
- Press
<leader>lt
(or your custom mapping) - The entire list will cycle through different formats
- Press
.
to repeat the cycle action on other lists (requires vim-repeat)
- Place your cursor on a checkbox line
- Press
<C-Space>
(or your custom mapping) - The checkbox will toggle between empty, checked, and partial states
- Press
.
to repeat the toggle action on other checkboxes (requires vim-repeat)
- The plugin is smart enough to handle nested lists and maintain proper indentation
- Parent checkboxes automatically show:
- [X] when all children are checked
- [-] when some children are checked
- [ ] when no children are checked
- Works seamlessly with org-mode syntax and conventions
Found a bug? Have a feature request? Feel free to:
- Open an issue
- Submit a pull request
- Start a discussion
All contributions are welcome!
MIT License - feel free to use this in your own projects!