summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-08 18:57:52 +0200
committerhut <hut@lavabit.com>2010-04-08 18:57:52 +0200
commitb8b7363781ff8c92ff2a0aa813cdee0b1c5ac034 (patch)
treec3af8b1d2e8dd761cd03c7e872e06b8e24ce9dd8
parente8faa101b6e59239e5bea2d52eba7b1d2ed707b0 (diff)
downloadranger-b8b7363781ff8c92ff2a0aa813cdee0b1c5ac034.tar.gz
changed {/}/[/] keys
-rw-r--r--ranger/defaults/keys.py14
1 files 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))