Alb*_*Alb 69 eclipse linux ide ubuntu keyboard-shortcuts
使用Eclipse时,我使用键盘箭头浏览包浏览器树.
在Windows中,我可以通过按键展开折叠节点→.在Linux中我需要按Shift+ →.有没有办法重新配置这个Shift不需要?
And*_*rew 112
把它放到你的~/.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"
Run Code Online (Sandbox Code Playgroud)
然后重新启动Eclipse以应用新绑定
big*_*erd 30
如果有人想知道如何使用GTK3 - 只需打开~/.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;
}
Run Code Online (Sandbox Code Playgroud)
小智 18
我的GTK3版本以更自然的方式运行.将以下内容添加到〜/ .config/gtk-3.0/gtk.css中:
@binding-set MyTreeViewBinding
{
bind "Left" { "select-cursor-parent" ()
"expand-collapse-cursor-row" (0,0,0) };
bind "Right" { "expand-collapse-cursor-row" (0,1,0) };
}
GtkTreeView
{
gtk-key-bindings: MyTreeViewBinding;
}
Run Code Online (Sandbox Code Playgroud)
Seb*_*ano 12
安德鲁提供的答案是正确的.请注意,在较新版本的Ubuntu中没有〜/ .gtkrc-2.0文件,因此您可以创建它,也可以编辑当前主题的gtkrc,该主题存储在
/usr/share/themes/your_theme/gtk-2.0/gtkrc
我尝试使用@Andrew Lazarev 的答案。然而,由于 GTK3.20 ( https://bugzilla.gnome.org/show_bug.cgi?id=766166 ) 上的非向后兼容更改,必须稍微调整绑定:
@binding-set MyTreeViewBinding
{
bind "Left" { "select-cursor-parent" ()
"expand-collapse-cursor-row" (0,0,0) };
bind "Right" { "expand-collapse-cursor-row" (0,1,0) };
}
treeview
{
-gtk-key-bindings: MyTreeViewBinding;
}
Run Code Online (Sandbox Code Playgroud)
请注意-之前的内容gtk-key-bindings并重GtkTreeView命名为treeview.