Godo is a plugin that allows you navigate through the todo messages in your Go project.
It makes use of astitodo
underneath.
- Fast browsing of todos.
- Todos
- View all todos in a specific file with
:Godo
. - View todos in a file sorted by assignees with
:Godo assignee_name
(e.g:Godo adelowo
.) - View todos sorted by multiple assignees with
:Godo assignee_name1 assignee_name2
- Find all todos in the current folder opened.
- Navigate to the source code line housing the todo message.
- Show a nice warning message if there aren't any todo in the file.
- View all todos in a specific file with
- Install
astitodo
binary by running:GodoInstallBinary
. - Update
astitodo
binary by running:GodoUpdateBinary
.
I recommend you use Vim-Plug to manage your vim plugins.
With Vim-Plug installed, put the following lines in your vimrc:
Plug 'adelowo/godo', { 'do': ':GodoInstallBinary' }
Then execute :PlugInstall
in command mode.
GodoInstallBinary
would fetch the astitodo library used for matching/finding todos.
" Config for :GodoInstallBinary and :GodoUpdateBinary
" This values defaults to 0
let g:go_get_update = 1 " Make use of the -u flag when installing the astitodo library.
let g:godo_install_verbose = 1 " Make use of the -v flag when installing the astitodo library..
" The flags above are passed to `go get`. You would want to refer to the official godoc for `go get` to understand what this flags stand for
g:go_get_update
is actually the same config defined byvim-go
. If it doesn't exist, it is set to 0 anyways.
godo doesn't come with key mapping defaults..
To view todos in a file, open a file buffer and :Godo
in command mode.. To map this to a key, you add this to your init.vim
(.vimrc
).
nmap <Leader>. :Godo<CR>
To filter todos in a file by assignees, you make use of :Godo assignee_name
.
:Godo adelowo " Would show all todos assigned to adelowo
:Godo adelowo lanre username " Would show all todos assigned to the specificied usernames
MIT