about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-30 02:37:26 +0200
committerhut <hut@lavabit.com>2010-04-30 02:37:26 +0200
commit5db3ddf07ac34bd9e5f5ebf6c4229b4854e7d76f (patch)
treeeec9a2299ec14c2487e12d7f4ba03e265af1ae71
parent2e971c4392957e455ef142318566b43a128fbf39 (diff)
downloadranger-5db3ddf07ac34bd9e5f5ebf6c4229b4854e7d76f.tar.gz
defaults.keys: new tabs start in the home directory
-rw-r--r--ranger/defaults/keys.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index 29a63df9..c7e4ec08 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -243,7 +243,10 @@ map('gR', fm.cd(RANGERDIR))
 map('gc', '<C-W>', fm.tab_close())
 map('gt', '<TAB>', fm.tab_move(1))
 map('gT', '<S-TAB>', fm.tab_move(-1))
-map('gn', '<C-N>', fm.tab_new())
+@map('gn', '<C-N>')
+def newtab_and_gohome(arg):
+	arg.fm.tab_new()
+	arg.fm.cd('~')   # To return to the original directory, type ``
 for n in range(1, 10):
 	map('g' + str(n), fm.tab_open(n))
 	map('<A-' + str(n) + '>', fm.tab_open(n))