linux - 是否可以单独使用箭头键在 Linux 上的 Eclipse 中的包资源管理器中伸展树(Splay Tree)节点?

标签 linux eclipse ubuntu ide keyboard-shortcuts

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

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

最佳答案

把它放到你的 ~/.gtkrc-2.0 中,你就可以开始了。左行和右行进行了请求的更改,其余的只是我个人添加的,以使 TreeView 的行为更像 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 以应用新的绑定(bind)

关于linux - 是否可以单独使用箭头键在 Linux 上的 Eclipse 中的包资源管理器中伸展树(Splay Tree)节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4747264/

相关文章:

linux - 制作 : Error on libowfat

c - 想在 C 中创建一个写模式的文件

java - 是否可以从 Eclipse 工作区中获取已删除的文件?

python-3.x - 由于 ModuleNotFoundError : No module named 'webdriver_manager' Ubuntu Python,无法运行运行脚本

linux - 如何在 Linux 中构建自定义终端?

C# 从 Linux 文件中获取文件所有者

java - Eclipse 停止控制台清除

java - Eclipse 插件开发,将不同的编辑器关联到相同的文件扩展名

c++ - 如何从 Linux 编译到 SDL2 应用程序到 Windows?

c - GDB SIGALRM,闹钟终止