I'm using vimwiki's managing todo-list feature as task management tool. So I edit the todo.wiki file frequently.
Everytime when I starting the todo list, I must type some command to open vim.exe(I use Launchy indeed), while the vim started,and then type \ww or :VimwikiIndex, I am tired of this way.
Is there any method that can auto load todo list when I want to ?I mean sometimes I just want to start vim for coding,and I have try the config below in .vimrc
autocmd VimEnter * VimwikiIndex
but vim open the todo-list everytime.So I want something like starting argument etc
When you start your coding sessions by passing file(s) to Vim, you could check for that:
autocmd VimEnter * if argc() == 0 | execute 'VimwikiIndex' | endif
Alternatively, you could pass a dummy file wiki
to Vim, and open the Wiki on that trigger:
autocmd VimEnter * if argv() ==# ['wiki'] | execute 'VimwikiIndex' | endif
But I would probably solve this outside of Vim through shell aliases
alias vimwiki='vim -c VimwikiIndex'
or a small vimwiki
wrapper batch file on Windows
@vim -c VimwikiIndex %*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With