2

I want to use F1 in vim-gnome* on Ubuntu 14.04.2. But when I press F1 I get Gnome "help". It's stopping me from remapping F1 to something useful.

Searching reveals that the trick is to use dconf to map F1 to something else, but this doesn't work for me; it stops the help window from appearing but Gnome still seems to be stealing the key before Vim sees it.

*: I've installed vim-gnome because that's what you have to do if you want support for clipboard but can't be bothered building Vim from source.

  • No need to justify yourself: vim-gnome is the only package worth installing on Ubuntu. – romainl Sep 5 '15 at 20:29
  • nnoremap <F1> :echo "something useful"<CR> works perfectly without doing anything weird. – romainl Sep 5 '15 at 20:33
  • Apparently Neovim is only going to ship with the one, full version - none of this cut-down nonsense! – user859 Sep 5 '15 at 21:07
2

I think gnome and the gnome-terminal intercept the keypresses, so that those keys never get through to Vim. This answer on Ask Ubuntu shows how to disable this specifically for gnome and the gnome-terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy