文章

nnn - best terminal file manager

nnn

nnn () is a full-featured terminal file manager. It’s tiny, nearly 0-config and incredibly fast.

nnn

live-preview

I use kitty, so I will take kitty as an example.

  1. enable kitty remote control: add two lines in ~/.config/kitty/kitty.conf
    1
    2
    
    allow_remote_control yes
    listen_on unix:/tmp/mykitty
    
  2. Download the live preview plugin
    1
    2
    
    wget https://raw.githubusercontent.com/jarun/nnn/master/plugins/preview-tui
    chmod +x preview-tui
    
  3. move the file into nnn’s plugin directory:
1
2
mkdir -p ~/.config/nnn/plugins
mv preview-tui ~/.config/nnn/plugins/
  1. config environments:add below lines into .bashrc or .zshrc:
1
2
export NNN_PLUG='p:preview-tui'
export NNN_FIFO=/tmp/nnn.fifo
  1. use nnn with -a option to enable the plguin:
1
nnn -a
  1. In nnn,press ;,and p to enable preview-tui plugin。

Enjoy it !!!

Reference

  1. Claude
  2. nnn live-preview wiki
本文由作者按照 CC BY 4.0 进行授权

热门标签