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