change ranger editor

This commit is contained in:
ponymushama 2024-07-24 11:48:17 +08:00
parent 095b27da4a
commit b6eecdf5d8

View file

@ -213,6 +213,9 @@ label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
label open, has xdg-open = xdg-open -- "$@"
label open, has open = open -- "$@"
# default editor
mime ^text, label editor, = ${VISUAL:-$EDITOR} -- "$@"
# Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"