cknadler / vim-anywhere

Use Vim everywhere you've always wanted to
MIT License
3.66k stars 147 forks source link

Clarification if Vimperator has the same feature you offer #28

Open wikimatze opened 10 years ago

wikimatze commented 10 years ago

Hi Chris,

thanks for taking your time to enhance Vim's ecosystem with such a useful plugin. What nags my mind is that such a feature already exist in vimperator and I can not figure out the difference.

Pressing <C-i> in any input field will invoke GVim where you can edit the text and by closing it, it will automatically insert the text in the field.

Does your plugin does something more than that? If yes, it isn't clear, maybe just add the link to Vimperator and try to explain the difference more cleanly.

Best wishes from Berlin,

Matthias

cknadler commented 10 years ago

Hey, thanks for the compliments. They make my day. ^_^

So I was definitely inspired by Vimperator. It's pretty sweet. There are some major differences between vim-anywhere and it though. Quoting the Vimperator docs:

Vimperator is a Firefox browser extension

vim-anywhere runs gVim or MacVim native on your system so you can use it anywhere. For instance, I commonly use vim-anywhere to type up emails. I've had a few people mention other use cases that I thought were really interesting. For instance, corresponding over chat involving code and you want to quickly write up an example that is properly formatted.

However, Vimperator does not try to be a 100% Vim clone

vim-anywhere is just invoking Vim, so it it is 100% everything you would expect and nothing more.

Hopefully that clears things up. Cheers!

wikimatze commented 10 years ago

Hi Chris,

that's something I can work with. I installed it and now I opened thunderbird and press to edit the text in gVim but nothing happens. Do I have to restart my system after installing it? Don't know if I'm the first Ubuntu user ... :).

cknadler commented 10 years ago

Hmn, thats interesting. Can you provide me with more details? What exactly happens? Does gVim open? Do you :wq gVim or are you closing it by closing the window?

Also, what version of Ubuntu are you running?

cknadler commented 10 years ago

The problem could either be the shortcut isn't getting set properly, or there is something wrong with the script. I'm better on the former.

wikimatze commented 10 years ago

I'm running Xubuntu (Ubuntu) 13.10 and I don't have a running gVim session. I just installed the script and did no configuration. You can find my vim configuration here: https://github.com/matthias-guenther/vim-settings

cknadler commented 10 years ago

Hmn, I definitely haven't tested anything on Xubuntu. Right now we only officially support Gnome. That said, I believe newer versions of Xubuntu use dconf so we should be able to get it to work.

The problem is, we are using the gnome interface to dconf, gsettings right now. @pyrated or I will open up a pull request to fix this sometime later tonight.

wikimatze commented 10 years ago

Okay, yeah did not thought about xfce :). Thanks for taking responsibility in this issue.

cknadler commented 10 years ago

Apparently using plain old dconf through the command line is a huge pain. gsettings (what we currently depend on) is much simpler. Until I can figure out dconf I can't really fix the installer. That said, it should fail because you would be missing gsettings and gconftool. Did it succeed? If so, thats definitely a bug.

wikimatze commented 10 years ago

I executed curl -fsSL https://raw.github.com/cknadler/vim-anywhere/master/install | bash and the installation was a success but running gconftool -t str --set /desktop/gnome/keybindings/vim-anywhere/binding Ctrl+Alt+v as well as disabling vimperator doesn't change anything. I could not find the /desktop/gnome/keybindings/vim-anywhere/binding folder on my system beginning from the /desktop directory. I think keybindings are stored under xfce under another location.

lavignes commented 10 years ago

@matthias-guenther /desktop/gnome/keybindings/vim-anywhere/binding isn't an actual directory. It's a path inside of a configuration file.

There is currently an issue with systems that use dconf (including Xubuntu) but also have gconftool installed. If you have gsettings installed then running:

gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['others', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybindings:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere name "vim-anywhere"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybindings:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere binding "<CTRL><ALT>v"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybindings:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere command "~/.vim-anywhere/bin/run"

Should correctly bind the keys. These commands are supposed to be running during install on systems like yours but they are not at the moment. I currently have no way of testing for xfce-based desktops right now, so your milage may vary.

You can also graphically modify these settings using dconf-editor.

wikimatze commented 10 years ago

Hi @pyrated thanks for your help. I actually could set gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['others', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere']" option and it showed up in the settings when I fire up dconf-editor.

But when I run gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybindings:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/vim-anywhere name "vim-anywhere" I get No such schema 'org.gnome.settings-daemon.plugins.media-keys.custom-keybindings'.

Again, I'm a little bit lost :).

ansatz commented 10 years ago

having same error as wikimatze first gsettings command works, second give No such schema ... error was this resolved ?

cknadler commented 8 years ago

Hey, are you guys still having this issue? Let me know and I can dig a little more into it. Thanks!

wikimatze commented 8 years ago

Almost forgot this issue :smile:, I tried gconftool -t str --set /desktop/gnome/keybindings/vim-anywhere/binding "<CTRL><ALT>v" and it is still not working. I'm now using Xubuntu 14.04.