From 97dc99931dd83b618f0b92cfd04b36173fcbc3dd Mon Sep 17 00:00:00 2001 From: Sighery Date: Sat, 12 Oct 2019 00:03:45 +0200 Subject: Document the usage of ? (help) --- doc/cheatsheet.svg | 175 +++++++++++++++++++++++++++++------------------------ 1 file changed, 96 insertions(+), 79 deletions(-) (limited to 'doc') diff --git a/doc/cheatsheet.svg b/doc/cheatsheet.svg index ac5cb4af..0a6e46e7 100644 --- a/doc/cheatsheet.svg +++ b/doc/cheatsheet.svg @@ -11,8 +11,8 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="1126" - height="830.00006" - viewBox="0 0 1126 830.00006" + height="842.93494" + viewBox="0 0 1126 842.93494" id="svg2" version="1.1" inkscape:version="0.92.4 5da689c313, 2019-01-14" @@ -28,20 +28,20 @@ borderopacity="1.0" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:zoom="2.8284271" - inkscape:cx="748.92357" - inkscape:cy="792.3976" + inkscape:zoom="0.99999999" + inkscape:cx="513.15525" + inkscape:cy="556.04639" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" units="mm" - inkscape:snap-bbox="false" + inkscape:snap-bbox="true" inkscape:bbox-paths="false" inkscape:bbox-nodes="true" inkscape:snap-text-baseline="true" - inkscape:snap-bbox-edge-midpoints="false" + inkscape:snap-bbox-edge-midpoints="true" inkscape:snap-nodes="false" - inkscape:snap-others="true" + inkscape:snap-others="false" inkscape:window-width="1920" inkscape:window-height="1056" inkscape:window-x="1920" @@ -62,8 +62,8 @@ spacingx="1" spacingy="1" enabled="true" - originx="-0.47216608" - originy="89.065153" /> + originx="-0.47216607" + originy="102.00002" /> @@ -3414,23 +3414,23 @@ id="g4738-4-8-1" transform="translate(710,-149.99998)"> + style="fill:#ffcc00;fill-opacity:1;stroke:#000000;stroke-width:1.04350078;stroke-opacity:1" /> + style="fill:#ff7f2a;fill-opacity:1;stroke:#ff0000;stroke-width:3.13050246;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> show help + id="tspan4438-4-1-4-5">show help (6) They can be escaped by replacing % with %%. + width="688.97827" + height="301.70618" + x="430.51086" + y="602.87305" + rx="2.1093534e-15" + ry="1.0721115e-15" /> (4) d also starts the keybindings (4) d also starts the key bindings dc (calculate size of the content of a directory), /usr/share/doc/ranger/examples/plugin_linemode.py + id="tspan6483">/usr/share/doc/ranger/examples/plugin_linemode.py(6) ? starts the key bindings m (man page), k (key bindings), c (commands), s (settings) + width="413.97375" + height="246.9077" + x="5.5135803" + y="842.87579" + rx="2.1092861e-15" + ry="1.0836082e-15" /> Config files" tocopy the default config files to ~/.config/ranger/. rc.conf: A list of commands that are executed when rangerstarts. Options, key bindings and aliases are found here.Pro tip: Adding "export RANGER_LOAD_DEFAULT_RC=FALSE" toyour shell rc will skip loading the default rc.conf before your own.commands.py: A python script containing custom commandsrifle.conf: Rules for rifle, the file opener. Each line looks like list of conditions = commandWhen ranger opens a file, it tests those conditions. The firstcommand where all conditions are true will be executed.scope.sh: The script that generates file previews.Plugins can be put in the plugins/ subdirectory, colorschemesin#ranger on irc.freenode.net + width="688.99841" + height="174.7262" + x="430.50052" + y="915.06982" + rx="2.1094151e-15" + ry="1.0312463e-15" /> Commands can be typed in by pressing : or added to ~/.config/ranger/rc.conf to apply then wheneverranger starts. All commands are listed in the man page. Some important ones: :shell [<flags>] <command> calls the given <command> with the shell specified in the environmentvariable $SHELL. <flags> can be "-f" to fork the process or "-p" to pipe the output to a pager. Macros like%f and %s are especially useful here. Example: ":shell -f inkscape %f" or ":shell sudo cp %c ./":alias <new> <old> creates the command <new> that calls <old>. The neat thing is that you can passarguments to the next command. Example: ":alias touch FILE",which will be translated to ":shell touch FILE".:map <key> <command> makes the <key> run <command> when pressed. This is the typical way todefine key bindings in rc.conf. There is also "pmap" to define keys in the pager and "unmap" and "punmap"to remove key bindings.