This page lists programs that people have found useful to integrate/use with ranger without implementing new commands for ranger. Custom commands for ranger can be found on another page.
Batch is a command-line program for batch processing. It has similar functionality to :bulkrename
.
Emacs' Dired has bulk renaming functionality too. (Of course it does : ))
Another alternative to :bulkrename
is vidir. Bulk/Batch sounds like a more general tool but with great power comes great responsibility.
Another option massren.
Bulk ⚠️ discontinued in favor of BatchBulk is a command similar to, and more powerful than :bulkrename
. This is a demo of how it used to work.
autojump automatically tracks which directories are visited and lets you jump to them with a fuzzy search, most visited directories preferred.
There's a plugin to integrate it with ranger: https://github.com/fdw/ranger-autojump. Then, the directories you opened in ranger are tracked in autojump, and you can also jump inside ranger with :autojump
.
fasd is an amazing utility that allow to quickly jump to recent files / directories. You can log files opened in ranger to fasd by creating ~/.config/ranger/plugins/plugin_fasd_log.py
containing :
import ranger.api try: from shlex import quote except ImportError: from pipes import quote old_hook_init = ranger.api.hook_init def hook_init(fm): def fasd_add(): fm.execute_console("shell fasd --add " + quote(fm.thisfile.path)) fm.signal_bind('execute.before', fasd_add) return old_hook_init(fm) ranger.api.hook_init = hook_init
See also Visit frequently used directories for using fasd inside ranger.
zoxide is a smarter cd
command. It allows you to cd
anywhere on your filesystem with just a few keystrokes.
It works across all shells, and supports ranger via the ranger-zoxide plugin.
The following plugin let you use ranger in place of the builtin netrw
. It's a nice alternative to the popular NERDTree
: https://github.com/francoiscabrol/ranger.vim
An alternate plugin for neovim is neoranger.
rnvimr makes ranger running in a floating window to communicate with neovim via RPC.
If you prefer to use ranger from a separate terminal window, another approach is to use vim's --remote
option or neovim-remote.
vim-floaterm also has a ranger wrapper which allows to open ranger and pick files from within the floating/normal window.
This text editor has commands to quickly open ranger in Tmux panes or X11 windows. For more information see: https://github.com/mawww/kakoune/wiki/Integrating-Other-CLI-apps#ranger
If using Xnview with rifle, and despite forking with flag 'f', it crashes compiz/unity, try this:
mime ^image, has xnview, X, flag f = setsid xnview "$@" &> /dev/null 2>&1 & disown
Make your shell change to ranger’s directory on quit
If you want your shell to remember the directory you've navigated to with ranger, you can run . ranger
or source ranger
instead of just ranger
.
To support passing directories like ranger /foo/bar
, you can create a shell alias like alias ranger='source ranger ranger'
(the first argument must be the path of the executable: https://github.com/ranger/ranger/issues/2187).
This runs the Bash script embedded in the ranger
script file. Alternatively, you can launch ranger via examples/shell_automatic_cd.sh’s ranger_cd
function. For the details see #1414. Note that it works only in Bash-compatible shells, i.e. not in fish.
Here's a fish-compatible function of ranger-cd:
# ~/.config/fish/functions/ranger.fish function ranger set tempfile (mktemp -t tmp.XXXXXX) command ranger --choosedir=$tempfile $argv set return_value $status if test -s $tempfile set ranger_pwd (cat $tempfile) if test -n $ranger_pwd -a -d $ranger_pwd builtin cd -- $ranger_pwd end end command rm -f -- $tempfile return $return_value endAllow deciding whether your shell should change to ranger’s directory on quit
If you want to change the dir on demand when you exit ranger, use the following wrapper function. With this, your shell changes the directory only when you quit ranger with keybinding capital Q
.
function ranger { local IFS=$'\t\n' local tempfile="$(mktemp -t tmp.XXXXXX)" local ranger_cmd=( command ranger --cmd="map Q chain shell echo %d > "$tempfile"; quitall" ) ${ranger_cmd[@]} "$@" if [[ -f "$tempfile" ]] && [[ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]]; then cd -- "$(cat "$tempfile")" || return fi command rm -f -- "$tempfile" 2>/dev/null }
A fish-compatible version of this on-demand-cd wrapper function:
function ranger set tempfile (mktemp -t tmp.XXXXXX) set command_argument "map Q chain shell echo %d > $tempfile; quitall" command ranger --cmd="$command_argument" $argv if test -s $tempfile set ranger_pwd (cat $tempfile) if test -n $ranger_pwd -a -d $ranger_pwd builtin cd -- $ranger_pwd end end command rm -f -- $tempfile end
Note: The builtin cd --
does not store history into the fish variable $dirprev
. If you wish to store directory history (so that you can cd -
for example), you can use the wrapper function cd
shipped with fish instead of the builtin. See the documentation on the fish cd
wrapper here.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4