在Linux上的Eclipse中,可以单独使用箭头键在package explorer中扩展树节点吗? [英] Is it possible to use arrow keys alone to expand tree node in package explorer in Eclipse on Linux?

查看:147
本文介绍了在Linux上的Eclipse中,可以单独使用箭头键在package explorer中扩展树节点吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Eclipse时,使用键盘箭头浏览包资源管理器树。

When using Eclipse I browse through the package explorer tree using the keyboard arrows a lot.

在Windows中,我可以通过按键来展开折叠的节点。在Linux中,我需要按 Shift + 。有没有办法重新配置,以便不需要 Shift

In Windows I can expand a collapsed node by pressing the key. In Linux I need to press Shift + . Is there a way to reconfigure this so that Shift is not required?

推荐答案

将其放入〜/ .gtkrc-2.0 你应该很好去。左和右线使请求的更改,其余只是我的个人添加,使树视图行为更像vim。希望有帮助!

Put this into your ~/.gtkrc-2.0 and you should be good to go. The Left and Right lines make the requested change, the rest are just my personal additions to make the tree-view act more vim-like. Hope that helps!

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"

然后重新启动您的Eclips e应用新的绑定

then restart your Eclipse to apply new bindings

这篇关于在Linux上的Eclipse中,可以单独使用箭头键在package explorer中扩展树节点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆