summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-30 02:49:28 +0200
committerhut <hut@lavabit.com>2010-04-30 02:49:28 +0200
commitd9c06cf4b542d321d99ce1c8135417fa845d357b (patch)
tree504381c0a081fdbdccb2221e52b402c06d6b42a5 /ranger
parent5db3ddf07ac34bd9e5f5ebf6c4229b4854e7d76f (diff)
downloadranger-d9c06cf4b542d321d99ce1c8135417fa845d357b.tar.gz
defaults.keys: implement I key
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/keys.py5
-rw-r--r--ranger/help/movement.py1
2 files changed, 5 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index c7e4ec08..a6d7eea6 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -218,6 +218,11 @@ def append_to_filename(arg):
 	command = 'rename ' + arg.fm.env.cf.basename
 	arg.fm.open_console(cmode.COMMAND, command)
 
+@map("I")
+def insert_before_filename(arg):
+	append_to_filename(arg)
+	arg.fm.ui.console.move(right=len('rename '), absolute=True)
+
 map('cw', fm.open_console(cmode.COMMAND, 'rename '))
 map('cd', fm.open_console(cmode.COMMAND, 'cd '))
 map('f', fm.open_console(cmode.COMMAND_QUICK, 'find '))
diff --git a/ranger/help/movement.py b/ranger/help/movement.py
index 82a13dc6..8a4c155a 100644
--- a/ranger/help/movement.py
+++ b/ranger/help/movement.py
@@ -192,7 +192,6 @@ Clicking into the preview window will usually run the file. |2?|
 	cw	Open the console with ":rename "
 	A	Open the console with ":rename <current filename>"
 	I	Same as A, put the cursor at the beginning of the filename
-		(not yet implemented)
 
 
 ==============================================================================