YCM-Generator icon indicating copy to clipboard operation
YCM-Generator copied to clipboard

Does not overwrite when run from NeoVim (:YcmGenerateConfig)

Open waldnercharles opened this issue 9 years ago • 5 comments

:YcmGenerateConfig will prompt to overwrite, but will return 1 immediately when in NeoVim.

Is this expected behavior?

waldnercharles avatar Jan 27 '16 21:01 waldnercharles

No, interactive behaviour is expected when run from Vim. Looks like this is due to a difference in how Neovim spawns processes - run :! cat terminates immediately as well. As explained in neovim/neovim#1477, this is because child processes do not get access to tty (since that would break the msgpack-rpc UI).

It's possible to workaround this using :terminal and the new job control API (I actually implemented this as an experiment), but on reflection it makes more sense to simply change the command to not overwrite unless it's suffixed with ! (for consistency with :w!, etc.)

rdnetto avatar Jan 28 '16 12:01 rdnetto

I've pushed a fix for this to develop - can you verify it's working?

rdnetto avatar Jan 29 '16 08:01 rdnetto

I got the same issue in with vim(not neovim)

Yanhao avatar Nov 03 '16 06:11 Yanhao

@YanhaoMo Please open a separate bug for that - Vim and Neovim handle child processes differently.

rdnetto avatar Nov 05 '16 10:11 rdnetto

develop branch is not working for me

a1lu avatar Nov 23 '17 09:11 a1lu