Git Product home page Git Product logo

Comments (11)

seyDoggy avatar seyDoggy commented on July 22, 2024 7

For newer releases (I'm using 15.10) that use dconf instead of gconf:

  • Go to All Settings -> Keyboard -> Shortcuts -> Custom Shortcuts.
  • Add custom keyboard shortcut:
    • Name: vim-anywhere
    • Command: /home/username/.vim-anywhere/bin/run
    • select the new shortcut and press ctrl+alt+v

To see these settings, open dconf editor and navigate to org -> gnome -> settings-daemon -> plugins -> media-keys -> custom-keybindings -> custom0 or in terminal:

dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/name
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command

from vim-anywhere.

NewMexicoKid avatar NewMexicoKid commented on July 22, 2024 4

This worked for me (ubuntu 16.04) after adding the entry via Go to All Settings -> Keyboard -> Shortcuts -> Custom Shortcuts. (couldn't get it to actually assign the key map):
dconf write /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/binding "'<Ctrl><Alt>v'"

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

Hey, sorry for the trouble.

What was the output of the installer? It should fail the install if you are missing any dependency. You are using Gnome right? I know you said Ubuntu, but just double checking.

from vim-anywhere.

tarciozemel avatar tarciozemel commented on July 22, 2024

Hi, @cknadler!

According the installer everything is installed and I already had Gnome and gVim installed.

Apparently everything is alright; vim-anywhere simply doesn't work... =(

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

Thats pretty strange. By nothing happens, I'm assuming you mean that gVim doesn't show up? What happens if you run the script directly?

$ ~/.vim-anywhere/bin/run -v # this will run what the shortcut would run with verbose output

If it still doesn't show up, paste me the output of that script.

from vim-anywhere.

 avatar commented on July 22, 2024

I had the same problem, but manually setting the key-binding resolved it for me. After a little testing though, I think gconftool isn't setting key-bindings even if it is installed, I'm on Linux Mint.

from vim-anywhere.

lesguillemets avatar lesguillemets commented on July 22, 2024

I had the same problem on Ubuntu 13.10.
Here is what I've got:

  • vim-anywhere is properly configured, and gconftool --get /desktop/gnome/keybindings/vim-anywhere/binding properly returns <CTRL><ALT>v.
  • Newer versions of Ubuntu seem to use dconf rather than gconf.
  • setting keyboard shortcut for ~/.vim-anywhere/bin/run manually (from All Settings -> Keyboard -> Shortcuts -> Custom Shortcuts) and rebooting (essentially, logging out and in) solves the issue.

After setting shortcut manually, in my environment,
dconf list /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0 shows 'binding', 'command' and 'name', where settings are stored.
dconf read /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/command shows '/home/(my_user_name)/.vim-anywhere/bin/run'.

from vim-anywhere.

lavignes avatar lavignes commented on July 22, 2024

We are aware that newer versions of gnome don't use gconf anymore. The current solution is to use gconftool if it is installed and use gsettings (dconf) as a fallback to set the shortcut. The real issue here is that people obviously have both gconf and dconf installed on their systems. We need a better solution to detect if a user has dconf as their main settings daemon vs gconf.

from vim-anywhere.

cknadler avatar cknadler commented on July 22, 2024

@pyrated good point. We will have to look at an alternate way to detect wether to use gconftool or gsettings. Clearly the current solution isn't working in all cases.

from vim-anywhere.

jamesdunham avatar jamesdunham commented on July 22, 2024

Incidentally, I was running into (what looked like) this problem with Ubuntu 14.04 and Gnome 3.10.4. ctrl + alt + v didn't launch gvim. But setting the shortcut in Keyboard -> Shortcuts -> Custom Shortcuts didn't resolve it.

I found that using the full path to vim-anywhere in Custom Shortcuts, e.g. /home/user/.vim-anywhere/bin/run instead of ~/.vim-anywhere/bin/run, worked as expected. The shortcut had been created successfully, but for some reason tilde expansion wasn't happening.

from vim-anywhere.

tallpaulSFO avatar tallpaulSFO commented on July 22, 2024

[Yes, I know that the following is neither a code issue nor Linux. Please feel free to add it to the FAQ or README or something; just pls don't merely delete it. Thx. I've put it here because, when I was looking for guidance, this is where I ended up. And I'm sharing the resolution in case anyone else hits it in the future.]

FYI, the keyboard shortcut didn't work for on MacOS Big Sur until I restarted my machine.

from vim-anywhere.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.