Closed hakamadare closed 8 years ago
I'm having this issue as well. +1
Confirmed. gnvim
script is still very half-baked.
Note that open -n -a Neovim ~/.bashrc
works as expected, but passing --args
and anything else to open
results in the file seeming to be opened multiple times. I also get odd behavior with the bundled gnvim
script in that the editor window will sometimes appear undrawn until I press enter, and then the file is opened RO.
Per @tvon observation, I tried to resort the parameter order and run open -n -a Neovim ~/.bashrc --args --cwd "$PWD"
, then run :args
, problem solved likely.
This is not a problem with gnvim. the problem is that app.mm
is providing the file which we are putting into the arguments vector and then adding any arguments as well.
https://github.com/rogual/neovim-dot-app/blob/master/src/app.mm#L226-240
here's the output of the current
gnvim
helper script when run withset -o xtrace
:in particular, note the last call to
open
, which passes in a single argument,doc/hierarchy.md
.now, inside the Neovim session, running
:args
shows:so it looks like Neovim.app has created two buffers, both editing the same file. running
nvim doc/hierarchy.md
for comparison only opens a single buffer,:args
outputs[doc/hierarchy.md]
.