-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: enable automatically switching to Neovim #35
Comments
Which OS are you on? I had tried it once, but I couldn't get it working reliably across all platforms. When you factor in the fact that many people run neovim inside their terminals, it becomes even harder. I am considering to look into how raghur implemented in vim-ghost, but I don't think I will be working on this before June. I am really busy till June. tl;dr - I will try, but not now. |
I'm on macOS, on which I believe raghur has you set a variable like: let g:ghost_darwin_app = 'kitty' " Tell vim-ghost which terminal to open. and then to switch to the app it runs
No urgency on my side 😁 . |
Just re-discovered this issue. 😆 I've left neovim and ghosttext long since, but I don't want to let this plugin rot unmaintained. After reading raghur's code, it looks like this is the function he is using - def _raise_window(self):
try:
if platform.system() == "Linux" and self.linux_window_id:
subprocess.call(["xdotool", "windowactivate",
self.linux_window_id])
logger.debug("activated window: %s", self.linux_window_id)
elif platform.system() == "Windows" and self.winapp:
logger.debug("WINDOWS: trying to raise window")
# dragons - this is the only thing that works.
try:
self.winapp.windows()[0].set_focus()
self.winapp.windows()[0].ShowInTaskbar()
except Exception as e:
logger.warning("Error during _raise_window, %s", e)
elif platform.system() == "Darwin" and self.darwin_app:
logger.debug("Darwin: trying to raise window")
subprocess.call(["osascript", "-e",
'tell application "' + self.darwin_app +
'" to activate'])
except Exception as e:
# with vim yarp etc - letting an exception escape messes
# with other plugins. so catch everything
logger.debug("error while activating window - %s" % e) Looks like in macOS it uses some @gibfahn Are you still using this plugin? If so, I will consider implementing this feature. Else, I shall keep it open for any future contributors as a "Good First Issue" |
Totally missed this, yes I'm still using the plugin. I have an easy shortcut to switch to my terminal though, so this isn't high-priority for me. |
Just came across this app, works ideally on my machine without dependencies.
One nice thing that vim-ghost does is automatically switching to nvim when you hit the ghost button in your browser (https://github.com/raghur/vim-ghost#auto-switching-to-vim).
Would be nice to have the same functionality in this plugin.
The text was updated successfully, but these errors were encountered: