mac cli文件管理器

背景

最近研究了一下在控制台查看文件的插件ranger, 官方的解释是:一个cli下的文件管理器。觉得效果也很酷炫,所以在此展示一下。

安装

shell 复制代码
brew install ranger

配置生成

建议第一次使用的时候使用

shell 复制代码
ranger --copy-config=all

将会在~/.config/ranger目录输出以下文件

bash 复制代码
commands.py             # 与以下命令一起启动的命令 :
commands_full.py        # 全套命令
rc.conf                 # 配置和绑定
rifle.conf              # 文件关联(用于打开文件的程序)
scope.sh                # 负责各种文件预览

命令行执行ranger即可

设置

以下配置都是修改 rc.conf

预览图片

shell 复制代码
set preview_images true
set preview_images_method iterm2

安装图标

shell 复制代码
brew install font-hack-nerd-font
git clone https://github.com/cdump/ranger-devicons2 ~/.config/ranger/plugins/devicons2
Add/change `default_linemode devicons2` in your `~/.config/ranger/rc.conf`

字体安装尝试了很多次,还是乱码,最终放弃了

显示行号

shell 复制代码
set line_numbers  true

设置宽度

shell 复制代码
set column_ratios  2,3,5

更多配置参考博客

参考文章

相关推荐
他们都不看好你,偏偏你最不争气3 小时前
【iOS】UIViewController
开发语言·macos·ios·objective-c·cocoa
李游Leo6 小时前
Rust 开发环境安装与 crates.io 国内源配置(Windows / macOS / Linux 全流程)
windows·macos·rust
库奇噜啦呼9 小时前
【iOS】UIViewController生命周期
macos·ios·cocoa
开开心心loky11 小时前
[iOS] 属性关键字
macos·ios·objective-c·cocoa·xcode
帅得不敢出门1 天前
macOS苹果电脑运行向日葵远程控制软件闪退
windows·macos·远程控制·向日葵
夏小花花1 天前
Mac m系列芯片向日葵打不开 解决方案
macos·mac
刹_那1 天前
MAC 多个版本 JDK进行切换
macos
应凌云1 天前
Mac环境Neovim 与 LazyVim 安装指南
macos
开开心心loky1 天前
[iOS] ViewController 的生命周期
macos·ui·ios·objective-c·cocoa
2301_794333911 天前
Docker Compose 运行 Milvus (Mac) 并与 python 连接测试
macos·docker·milvus