- 打开
~/.config/ranger/rifle.conf
, 找到以下代码段:
将上面两个#------------------------------------------- # Misc #------------------------------------------- # Define the "editor" for text files as first action mime ^text, label editor = $EDITOR -- "$@" mime ^text, label pager = "$PAGER" -- "$@" !mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@" !mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
$EDITOR
修改成nvim
, 如下:
下次再用#------------------------------------------- # Misc #------------------------------------------- # Define the "editor" for text files as first action mime ^text, label editor = nvim -- "$@" mime ^text, label pager = "$PAGER" -- "$@" !mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = nvim -- "$@" !mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ranger
打开文件时, 默认编辑器就变成neovim
啦
将ranger的默认编辑器配置成neovim
最新推荐文章于 2024-06-19 09:47:58 发布