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))
='n148' href='#n148'>148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275