Open
Conversation
This is a very first attempt at enabling neovim support for
vim-taskwarrir. In my use the only functions that require interaction
are undo and delete, for these two functions there is a check
`has('nvim')` which changes execution from `!` to `terminal`. There is
also no `taskwarrior#refresh()` call, which is done in a BufEnter
autocmd.
The refresh of the terminal occurred before sync had updated so any new tasks were not showing up when syncing in neovim.
kalbasit
suggested changes
May 23, 2017
autoload/taskwarrior/action.vim
Outdated
| endif | ||
| endif | ||
| if !has('nvim') | ||
| call taskwarrior#refresh() |
There was a problem hiding this comment.
I think you have in indentation problem here
| call taskwarrior#list() | ||
| else | ||
| execute 'terminal task '.taskwarrior#data#get_uuid().' delete' | ||
| endif |
There was a problem hiding this comment.
it's generally better if you start with the positive route if has('nvim')
Author
There was a problem hiding this comment.
Thanks for the feedback, I think I have fixed/improved the bits of code that you picked up.
All the conditionals in the check for nvim have been modified to check for the positive rather than negative.
I am creating a new window every time there is a call to terminal, as without it when there are multiple windows or tabs open the terminal call will close the current window.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a very first attempt at enabling neovim support for
vim-taskwarrior #132 . In my use the only functions that require interaction
are undo and delete, for these two functions there is a check
has('nvim')which changes execution from!toterminaland there isalso no
taskwarrior#refresh()call, which is done using a BufEnterautocmd.
There is likely a better solution that I don't yet know about.