一尘不染

在Linux上的Eclipse中,是否可以单独使用箭头键来扩展包浏览器中的树节点?

linux

使用Eclipse时,我经常使用键盘箭头浏览包浏览器树。

在Windows中,我可以通过按键来展开折叠的节点。在Linux中,我需要按Shift+
。有没有一种方法可以重新配置它Shift而不是必需的?


阅读 203

收藏
2020-06-03

共1个答案

一尘不染

将其放入您的手机中~/.gtkrc-2.0,您应该会很好。左和右行进行了请求的更改,其余只是我个人添加的内容,以使树状视图更像vim。希望有帮助!

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"

然后重新启动Eclipse以应用新的绑定

2020-06-03