Closed tuxflo closed 4 years ago
At first thanks for nvr it helped me a lot to get our of nested neovim sessions...
Thanks. :)
Okay, the issue is that -l
(which really is just a shortcut for -cc 'wincmd p'
), is used unconditionally here. Try this instead:
export REACT_EDITOR="nvr -cc 'if &buftype ==# \"terminal\" | wincmd p | endif'"
It's working interactively from the shell, so it should work for REACT_EDITOR
as well. Closing. :)
Sorry for the late reply!
Yes, the workaround works, but one has to add the parameters to the lauchEditor.js
file of the Create React App react-dev-utils.
Thanks again for nvr
and helping :+1:
Hi! At first thanks for
nvr
it helped me a lot to get our of nested neovim sessions... My current workflow for a react app looks like that:yarn start
)The tool Create React App which is used for the React project is able to open up the editor directly from a browser tab if an error occurs. With setting the environment variable REACT_EDITOR="nvr -l" this works as expected: if the term split was focused it switches the window (
-l
flag) and opens the file. But if the term split is not focused (which is more often the case) it openes the file in the term split.So basically the question is: is there a way to tell
nvr
it shouldn't open files inside terminal buffers?