qutebrowser / qutebrowser-extensions

Extension ideas (and at some point code) for qutebrowser
31 stars 1 forks source link

Optional Text Editor Input for Form Fields #26

Closed mcdviii closed 3 years ago

mcdviii commented 3 years ago

I'm wondering if something like GhostText could be implimented into qutebrowser--or is this something that would be too heavy or impossible for the project?

jcguu95 commented 3 years ago

nvim is my text editor and I can do the same by putting

config.set('editor.command', ["alacritty", "-e", "nvim", "{}"])  
config.bind('<Ctrl-e>',"open-editor")

in my ~/.config/qutebrowser/config.py.

(Notice that alacritty is my terminal emulator.)

mcdviii commented 3 years ago

Amazing.

I was able to get the same functionality with the following:

config.set('editor.command', ["emacs", "{}"])
config.bind('<Ctrl-e>',"open-editor")

Now I'm wondering if it's possible to open the editor as a separate window in an already running Emacs instance. What other options are available other than "open-editor"? Where might I be able to find documentation on this?

Thank you for the point in the right direction. This goes a long way toward helping me make the switch.

jcguu95 commented 3 years ago

For that you should use emacsclient which is very helpful.

Launch an emacs daemon by $ emacs --daemon. It will run emacs in the background. Open a frame of that daemon by $ emacsclient -c. If you like a frame in terminal, use $ emacsclient -t.

mcdviii commented 3 years ago

Thanks so much. I was able to get this to work the way I wanted with the following:

# Set editor keybinding
config.set('editor.command', ["emacsclient", "{}"])
config.bind('<Ctrl-e>',"open-editor")

I always have a GTK native Emacs window open. This opens a window inside that already running DE instance.

Thanks so much for your help. I'll continue poking around in the official documentation. Cheers!