2

I'm trying to navigate in "call hierarchy view" in Eclipse on Linux Mint using arrow keys (left / right). This works beautifully on Windows 10. Whats wrong with the version for Linux? Any of you guys facing similar issue? Any workarounds for this? I'm really missing this feature.

Cheers! PK.

enter image description here

Eclipse

  • Eclipse Java EE IDE for Web Developers.
  • Version: Neon.2 Release (4.6.2)
  • Build id: 20161208-0600

System

  • Distributor ID: LinuxMint
  • Description: Linux Mint 18.1 Serena
  • Release: 18.1
  • Codename: serena
retromuz
  • 809
  • 9
  • 26
  • 1
    Searching for an answer to this same question. I'm on a Fedora installation and this solution here did not help, maybe it will help you: http://stackoverflow.com/questions/4747264/is-it-possible-to-use-arrow-keys-alone-to-expand-tree-node-in-package-explorer-i – Darren Felton Feb 09 '17 at 21:00
  • Hey @Meogi, thanks to you, mine works now. Please see the answer below. Change both 2.0 and 3.0 configs. Just give it a try, nothing to lose. – retromuz Feb 10 '17 at 01:25

1 Answers1

1

Kudos to @Meogi! I followed the link @Meogi referenced in the comment.

Modified both gtk configs for gtk-2.0 and gtk-3 located in mine at:

~/.config/gtkrc-2.0 and ~/.config/gtk-3.0/gtk.css

And it worked like a charm.

Find below exact config for : ~/.config/gtkrc-2.0

binding "gtk-binding-tree-view" {
    bind "j"        { "move-cursor" (display-lines, 1) }
    bind "k"        { "move-cursor" (display-lines, -1) }
    bind "h"        { "expand-collapse-cursor-row" (1,0,0) }
    bind "l"        { "expand-collapse-cursor-row" (1,1,0) }
    bind "o"        { "move-cursor" (pages, 1) }
    bind "u"        { "move-cursor" (pages, -1) }
    bind "g"        { "move-cursor" (buffer-ends, -1) }
    bind "y"        { "move-cursor" (buffer-ends, 1) }
    bind "p"        { "select-cursor-parent" () }
    bind "Left"     { "expand-collapse-cursor-row" (0,0,0) }
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) }
    bind "semicolon" { "expand-collapse-cursor-row" (0,1,1) }
    bind "slash"    { "start-interactive-search" () }
}
class "GtkTreeView" binding "gtk-binding-tree-view"

and ~/.config/gtk-3.0/gtk.css

@binding-set MyTreeViewBinding
{
    bind "Left"     { "expand-collapse-cursor-row" (0,0,0) };
    bind "Right"    { "expand-collapse-cursor-row" (0,1,0) };
}

GtkTreeView
{
  gtk-key-bindings: MyTreeViewBinding;
}
retromuz
  • 809
  • 9
  • 26
  • did you need to restart, or do anything else to get this to take effect? Still not working for me on Eclipse Neon.2 (4.6.2), Fedora Xfce 18.1. I have noticed that Shift+Left/Right work to expand/close, that's about it. – Darren Felton Feb 10 '17 at 15:00
  • I just gave Neon.2 a restart and that's about it. Please check permissions of those two files. The user(you're running Neon from) should have permissions to read those files. If it still doesn't work it should be something to do with Neon2 + xfce combination. I'm running Cinnamon. – retromuz Feb 11 '17 at 21:05