summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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))