From f68f1d9a3b58d7c52dfd689adad594c2c7bcf1eb Mon Sep 17 00:00:00 2001 From: Stanislav Arnaudov Date: Mon, 18 Mar 2019 22:12:41 +0100 Subject: Rewriting some things and adding examples --- doc/ranger.pod | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/ranger.pod b/doc/ranger.pod index cc55d6ac..410b8cb0 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -302,19 +302,32 @@ The macro %space expands to a space character. You can use it to add spaces to the end of a command when needed, while preventing editors to strip spaces off the end of the line automatically. -The macros %any and %any_path can be used when binding keys to -commands. The macro %any will exapnd to the key pressed in the place of -. The macro %any_path will exapnd to the path of the bookmark which -is mapped to the key that is pressed in the place of . For example: + +When mapping keys you can use the placeholder , the key entered +in that position can be used through the %any and %any_path macros. In +this context is used as a placeholder in the keybinding. The +macro %any will be replaced with the key pressed in the place of +. The macro %any_path will replaced with the path of the bookmark +which is mapped to the key in the place of . For example: map c echo %any -can be used to echo the key that was pressd after "c". +can be used to echo the key that was pressed after "c". %any is used in +the ranger configuration to create a keybinding for adding a bookmark. + + map m set_bookmark %any + +set_bookmark creates a bookmark for the current directory and the +key for the bookmark is the first supplied argument. In this case - +the key pressed after "m". map c echo %any_path can be used to echo the path of the booksmark that is set to the key -pressed after "c". +pressed after "c". A practical example of the use of %any_path is the +pasting of the cut\copied files in a selected bookmark + + map p' paste dest=%any_path To write a literal %, you need to escape it by writing %%. @@ -883,7 +896,7 @@ Draw borders around or between the columns? Possible values are: outline draw an outline around all the columns separators draw only vertical lines between columns both both of the above - + =item draw_progress_bar_in_status_bar [bool] Draw a progress bar in the status bar which displays the average state of all @@ -1409,8 +1422,8 @@ Sets the linemode of all files in the current directory. The linemode may be: "humanreadablesizemtime": display each line as "... " in a human readable format, more precise the more recent "metatitle": display metadata from .metadata.json files if - available, fall back to the "filename" linemode if no - metadata was found. See :meta command. + available, fall back to the "filename" linemode if no + metadata was found. See :meta command. The custom linemodes may be added by subclassing the I class. See the I module for some examples. -- cgit 1.4.1-2-gfad0