TaskWikiEdit: Use :terminal instead of :! in NEOVIM

This commit is contained in:
Tomas Babej 2017-05-20 11:19:36 +02:00
parent 6bcc93cfe6
commit c5d46e80f2

View file

@ -125,8 +125,13 @@ class SelectedTasks(object):
location_override = ('rc.data.location=' + alternate_data_location
if alternate_data_location else '')
vim.command('! task {0} {1} edit'
.format(location_override, vimwikitask.uuid))
# Build command template, it is different for neovim and vim
command = (
('terminal' if util.NEOVIM else '!') +
' task {0} {1} edit'
)
vim.command(command.format(location_override, vimwikitask.uuid))
self.save_action('edit')
@errors.pretty_exception_handler