oni2 icon indicating copy to clipboard operation
oni2 copied to clipboard

Unable to Open Multiple OniVim Windows on Ubuntu

Open Christopher-Hayes opened this issue 3 years ago • 4 comments

Summary

When I have one OniVim window open, I am unable to open a second OniVim window / instance.

Description

Different ways I've tried opening a second instance:

  • Running the .AppImage with OniVim already open will just focus the OniVim that is currently open (Ubuntu will also send a "OniVim is ready" desktop notification)
  • I have a .desktop file setup with OniVim, which allows me to add OniVim to my taskbar "favorites". It also means if I right-click on the app, it gives an "Open in a New Window" option. That will not open a new window; however.
  • Using CTRL + ENTER when running the .AppImage from the shell is for running a new instance of an application. This didn't work either and only printed the result [1]+ Done.

In conclusion, it seems like OniVim needs to specifically support multiple instances.

Use-Case

I would like to use OniVim on multiple projects.

Specs

Version: 0.5.9-nightly | 7c00d368 OS: Ubuntu 20.04

Christopher-Hayes avatar May 30 '21 22:05 Christopher-Hayes

Hey!

We do actually support multiple windows, it was just the default behaviour was swapped to reuse the existing instance. That makes something like oni2 file.txt reuse it rather than open up a second window, which isn't usually desirable.

There is a -n /--new flag for the CLI that will always open a new window, but I don't know how well that will work for the desktop file case. I seem to think you can pass args in a desktop file, though it would be good for us to check/compare our behaviour to something like VSCode.

CrossR avatar May 31 '21 09:05 CrossR

Ah, okay. I understand the use-case. So, VSCode and other applications like browsers if you open a file, it'll reuse the current window. Which OniVim seems to do similarly. The only trouble is, it's like OniVim specifically prevents a new window from being opened. The second and third options listed in the bug description are standard methods on Ubuntu of opening up a new window for an application. OniVim seems to break away from that.

Thank you for the -n option, I'll start using that.

Christopher-Hayes avatar May 31 '21 14:05 Christopher-Hayes

Hmm; I like that I can now use multiple windows, but does it have to be a different process? on macOS the normal way to switch between instances of the same app is "cmd-`" - but that doesn't work with onivim because they are all fully different instances of the application, so they don't share a dock icon and you can't cycle through them. On the mac that's a pretty significant usability issue

taxilian avatar Oct 29 '21 05:10 taxilian

Underlying issue https://github.com/revery-ui/revery/issues/224

Et7f3 avatar Oct 29 '21 07:10 Et7f3