Skip to content

Features

Arijit Basu edited this page May 29, 2021 · 48 revisions

Hackable

xplr is built with configurability in mind. So it allows you to perform a vast set of operations and make it behave just the way you want.

You can easily dump the default configuration or copy it into ~/.config/xplr/init.lua and then tweak it. And next time when you run xplr, it will load that configuration.

However, it is recommended that you tweak only the sections you want to customize to keep your config file clean and minimal.

A few things you can do with the xplr configuration

Once you understand the concept, try these

Fast

Although speed is not the primary concern, xplr is already fast enough so that you can take it out for a walk into your node_modules or /nix/store any time you want. I currently measure the most commonly used operations and I have seen it improve significantly over time, and it's only the start.

Tip: A quick and easy way to optimize UI rendering is reducing the number of columns in the table.

Note: If you feel xplr is not behaving at its optimal, this is probably because I am waiting for someone to complain. I want to avoid optimizing things I don't need to, because optimization often requires either complexity or feature sacrifice or both.

Minimalist

xplr prefers to stay minimal, both in terms of features and binary size, but just like speed, minimalism isn't as aggressively pursued as configurability. If adding some feature, lines of code, or a dependency allows the users to be a little more productive or allows xplr to be a little more configurable, it will be considered. But of-course, the bulk vs productivity gain per user balance will also be considered in the decision-making.

Integration

Being super configurable, xplr by design integrates well with other tools. Try this fzf integration tutorial or this vim plugin if you are not convinced yet.

Other features

  • Embedded LuaJIT for portability and extensibility.
  • Recover mode: Saves you from doing unwanted things when in a hurry.
  • Sane (vim-like) defaults:
    • Use h, j, k, l or arrow keys for basic navigation.
    • Go to top using gg, and bottom using G.
    • Travel history using ctrl-o and ctrl-i.
    • Go to home directory using ~.
    • Enter search mode with / or ctrl-f.
    • Go to absolute index (e.g. 4) using 4enter or :4enter.
    • Go to relative index (e.g. 4 down) using 4down or :4down.
    • Follow symlink using gf.
    • Open in GUI using gx.
    • Spawn terminal using :!.
    • Toggle selection using v or space.
    • Toggle select all using V or ctrl-a.
    • Clear selections using ctrl-u.
  • Separate keys for navigation: navigation are separated from the action keys (e.g. file opening action).
  • Always visible panels to save you brain cycles:
    • Selection list.
    • Help menu.
    • Input & logs.
    • Filter and sort pipeline.
  • Batch creation: Create multiple files and directories without repeating keys.
  • Batch sort & filter: Apply filters and sorters in without repeating keys.
  • Custom file properties: Display custom file properties with custom colors in the table using Lua functions.
  • Input buffer: Read user input using the built-in input buffer with customizable behavior.
  • Switchable layouts: Switch layouts dynamically without leaving xplr.
  • Saved locations: Never lose context when travelling back and forth directories.
  • Auto refresh state: Auto refresh app state when the $PWD changes.
  • Manually refresh UI: Manually refresh UI when other apps mess it up.
  • Different quit options:
    • Quit with success and stdout output (enter).
    • Quit with success without output (q).
    • Quit with failure (ctrl-c).
Clone this wiki locally