From b8b7363781ff8c92ff2a0aa813cdee0b1c5ac034 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 8 Apr 2010 18:57:52 +0200 Subject: changed {/}/[/] keys --- ranger/defaults/keys.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py index 623cd53f..6f50635e 100644 --- a/ranger/defaults/keys.py +++ b/ranger/defaults/keys.py @@ -74,8 +74,18 @@ def initialize_commands(map): map(ctrl('d'), 'J', fm.move_pointer_by_pages(0.5)) map(ctrl('u'), 'K', fm.move_pointer_by_pages(-0.5)) - map(']', fm.traverse()) - map('[', fm.history_go(-1)) + def move_parent(n): + def fnc(arg): + arg.fm.move_left() + arg.fm.move_pointer(n) + if arg.fm.env.cf.is_directory: + arg.fm.move_right() + return fnc + + map(']', move_parent(1)) + map('[', move_parent(-1)) + map('}', fm.traverse()) + map('{', fm.history_go(-1)) # --------------------------------------------------------- history map('H', fm.history_go(-1)) -- cgit 1.4.1-2-gfad0