From fabab01bda21868be0d47e053c65b48a9102b820 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 10 Apr 2015 00:02:12 +0200 Subject: added "%space" macro that expands to " ", use it in rc.conf --- ranger/config/rc.conf | 22 +++++++++++----------- ranger/core/actions.py | 1 + 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf index 62dd030f..fd883cb8 100644 --- a/ranger/config/rc.conf +++ b/ranger/config/rc.conf @@ -241,13 +241,13 @@ map S shell $SHELL map : console map ; console -map ! console shell +map ! console shell%space map @ console -p6 shell %%s -map # console shell -p -map s console shell -map r chain draw_possible_programs; console open_with -map f console find -map cd console cd +map # console shell -p%space +map s console shell%space +map r chain draw_possible_programs; console open_with%space +map f console find%space +map cd console cd%space # Change the line mode map Mf linemode filename @@ -271,7 +271,7 @@ map display_file map edit map copy map cut -map console mkdir +map console mkdir%space map console delete map exit @@ -286,7 +286,7 @@ map move down=1 pages=True map move up=1 pages=True map move right=1 #map console delete -map console touch +map console touch%space # VIM-like copymap k @@ -337,7 +337,7 @@ map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b # Filesystem Operations map = chmod -map cw console rename +map cw console rename%space map a rename_append map A eval fm.open_console('rename ' + fm.thisfile.basename) map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7) @@ -372,7 +372,7 @@ map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) # Searching -map / console search +map / console search%space map n search_next map N search_next forward=False map ct search_next order=tag @@ -439,7 +439,7 @@ map zP toggle_option preview_directories map zs toggle_option sort_case_insensitive map zu toggle_option autoupdate_cumulative_size map zv toggle_option use_preview_script -map zf console filter +map zf console filter%space # Bookmarks map ` enter_bookmark %any diff --git a/ranger/core/actions.py b/ranger/core/actions.py index c7bdcfec..ef74d7a2 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -210,6 +210,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): macros = {} macros['rangerdir'] = ranger.RANGERDIR + macros['space'] = ' ' if self.fm.thisfile: macros['f'] = self.fm.thisfile.relative_path -- cgit 1.4.1-2-gfad0