Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 5, 2026·3 min de lecture

Ranger — Terminal File Manager with Vi Keybindings

Ranger is a console file manager with vi-style key bindings, file previews, and a multi-column directory layout that makes navigating and manipulating files fast without leaving the terminal.

Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Ranger
Commande CLI universelle
npx tokrepo install 8fafb989-485a-11f1-9bc6-00163e2b0d79

Introduction

Ranger is a text-based file manager that uses a Miller columns layout (like macOS Finder column view) in the terminal. It is written in Python with vi-style keybindings, making it efficient for developers who already think in hjkl.

What Ranger Does

  • Displays directories in a three-column layout: parent, current, and preview
  • Provides file previews for text, images (via w3m/kitty/sixel), PDFs, and archives
  • Supports bulk rename, multi-file selection, tabs, and bookmarks
  • Integrates with external tools: rifle (opener), atool (archives), highlight (syntax)
  • Allows full customization via Python config files and plugins

Architecture Overview

Ranger is a single-threaded Python application using curses for terminal rendering. The file system is lazily loaded into an internal directory model. The rifle file opener uses a rule-based MIME config to dispatch files to the correct program. Previews are generated by scope.sh, a user-editable shell script.

Self-Hosting & Configuration

  • Install from PyPI (pip install ranger-fm) or system package manager
  • Generate default config with ranger --copy-config=all (creates rc.conf, rifle.conf, scope.sh)
  • Edit ~/.config/ranger/rc.conf to change keybindings, sorting, and display options
  • Customize file previews by editing scope.sh (add handlers for new file types)
  • Enable image previews by setting set preview_images true and choosing a method (kitty, ueberzug, w3m)

Key Features

  • Vi-native navigation: hjkl, gg, G, /, :commands
  • Tabs and bookmarks for quick directory switching
  • Bulk rename via :bulkrename which opens filenames in $EDITOR
  • Extensible with Python plugins (Git status, icons, archive mounting)
  • Trash support via integration with trash-cli

Comparison with Similar Tools

  • nnn — faster (written in C) and lighter, but minimal UI; less visual feedback
  • lf — Go rewrite inspired by Ranger; faster startup, fewer built-in features
  • Yazi — Rust-based, async I/O, faster for large dirs; newer with smaller plugin ecosystem
  • Midnight Commander (mc) — dual-pane orthodox style; different UX paradigm
  • Thunar/Nautilus — graphical file managers; require a desktop environment

FAQ

Q: Is Ranger slow on large directories? A: Python-based, so yes compared to C/Rust alternatives. For dirs with 10k+ files, consider nnn or Yazi.

Q: How do I enable file icons? A: Install the ranger_devicons plugin and a Nerd Font in your terminal.

Q: Can I use Ranger as a file picker for other apps? A: Yes. Use ranger --choosefile=/tmp/pick and read the selected path from that file.

Q: Does Ranger support Git integration? A: Via plugins. The built-in VCS integration shows git status indicators in the file list.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires