Yazi : Add text and hex by default to all files.
This commit is contained in:
parent
23d036b676
commit
2c6fa18226
|
@ -34,6 +34,9 @@
|
|||
-- Save all we can and leave.
|
||||
rekey_normal("<Leader>z", "<cmd>lua bye()<cr>")
|
||||
|
||||
-- Just leave, no saves.
|
||||
rekey_normal("<Leader>Z", "<cmd>qa!<cr>")
|
||||
|
||||
-- Remap ; to :.
|
||||
rekey_normal(";", ":")
|
||||
rekey_visual(";", ":")
|
||||
|
|
|
@ -70,27 +70,25 @@
|
|||
hex = [{
|
||||
desc = "Hex";
|
||||
block = true;
|
||||
run = openWith "radare2 -c V";
|
||||
run = openWith "radare2 -c V -w";
|
||||
}];
|
||||
};
|
||||
|
||||
open = {
|
||||
rules = let
|
||||
mkRule = mime: use: { inherit mime use; };
|
||||
mkRule = mime: use: { inherit mime; use = use ++ [ "text" "hex" ]; };
|
||||
in [
|
||||
(mkRule "application/gzip" "archive")
|
||||
(mkRule "application/json" "text")
|
||||
(mkRule "application/octet-stream" [ "text" "hex" ])
|
||||
(mkRule "application/pdf" "pdf")
|
||||
(mkRule "application/x-tar" "archive")
|
||||
(mkRule "application/x-xz" "archive")
|
||||
(mkRule "application/zip" "archive")
|
||||
(mkRule "audio/*" "audio")
|
||||
(mkRule "image/*" "image")
|
||||
(mkRule "text/html" [ "browser" "text" ])
|
||||
(mkRule "text/*" "text")
|
||||
(mkRule "video/*" "video")
|
||||
(mkRule "application/vnd.openxmlformats-officedocument.*" "document")
|
||||
(mkRule "application/gzip" [ "archive" ])
|
||||
(mkRule "application/x-tar" [ "archive" ])
|
||||
(mkRule "application/x-xz" [ "archive" ])
|
||||
(mkRule "application/zip" [ "archive" ])
|
||||
(mkRule "application/pdf" [ "pdf" ])
|
||||
(mkRule "audio/*" [ "audio" ])
|
||||
(mkRule "image/*" [ "image" ])
|
||||
(mkRule "video/*" [ "video" ])
|
||||
(mkRule "text/html" [ "browser" ])
|
||||
(mkRule "application/vnd.openxmlformats-officedocument.*" [ "document" ])
|
||||
(mkRule "*" [ ])
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue