Helix: html tag macros
This commit is contained in:
parent
b16e507c03
commit
fc5aa1e47a
1 changed files with 51 additions and 55 deletions
|
|
@ -79,10 +79,42 @@
|
|||
character = "▏";
|
||||
};
|
||||
};
|
||||
keys.normal = {
|
||||
keys =
|
||||
let
|
||||
macro = pkgs.writeShellScript "macro" ''
|
||||
mode="$1"
|
||||
shift
|
||||
|
||||
case "$mode" in
|
||||
t)
|
||||
# Block tag with newlines
|
||||
echo "<xxx>"
|
||||
cat
|
||||
echo "</xxx>"
|
||||
;;
|
||||
i)
|
||||
# Inline tag (no newlines)
|
||||
echo -n "<xxx>"
|
||||
cat
|
||||
echo -n "</xxx>"
|
||||
;;
|
||||
*)
|
||||
echo "Unknown macro mode: $mode" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
'';
|
||||
in
|
||||
{
|
||||
normal = {
|
||||
"C-A-l" = ":format";
|
||||
"A-r" = ":reload";
|
||||
"C-A-r" = ":reload-all";
|
||||
"L" = { "i" = "@|${macro} i<ret>sxxx<ret>c"; "t" = "@|${macro} t<ret>sxxx<ret>c"; };
|
||||
};
|
||||
select = {
|
||||
"L" = { "i" = "@|${macro} i<ret>sxxx<ret>c"; "t" = "@|${macro} t<ret>sxxx<ret>c"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
themes =
|
||||
|
|
@ -103,56 +135,24 @@
|
|||
{
|
||||
base16 = {
|
||||
"ui.menu" = transparent;
|
||||
"ui.menu.selected" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.linenr" = {
|
||||
fg = gray;
|
||||
bg = dark-gray;
|
||||
};
|
||||
"ui.popup" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.linenr.selected" = {
|
||||
fg = white;
|
||||
bg = black;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.selection" = {
|
||||
fg = black;
|
||||
bg = blue;
|
||||
};
|
||||
"ui.selection.primary" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"comment" = {
|
||||
fg = gray;
|
||||
};
|
||||
"ui.statusline" = {
|
||||
fg = white;
|
||||
bg = dark-gray;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = dark-gray;
|
||||
bg = white;
|
||||
};
|
||||
"ui.help" = {
|
||||
fg = dark-gray;
|
||||
bg = white;
|
||||
};
|
||||
"ui.cursor" = {
|
||||
modifiers = [ "reversed" ];
|
||||
};
|
||||
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr" = { fg = gray; bg = dark-gray; };
|
||||
"ui.popup" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
|
||||
"ui.selection" = { fg = black; bg = blue; };
|
||||
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
|
||||
"comment" = { fg = gray; };
|
||||
"ui.statusline" = { fg = white; bg = dark-gray; };
|
||||
"ui.statusline.inactive" = { fg = dark-gray; bg = white; };
|
||||
"ui.help" = { fg = dark-gray; bg = white; };
|
||||
"ui.cursor" = { modifiers = [ "reversed" ]; };
|
||||
"variable" = red;
|
||||
"variable.builtin" = orange;
|
||||
"constant.numeric" = orange;
|
||||
"constant" = orange;
|
||||
"attributes" = yellow;
|
||||
"type" = yellow;
|
||||
"ui.cursor.match" = {
|
||||
fg = yellow;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
|
||||
"string" = green;
|
||||
"variable.other.member" = red;
|
||||
"constant.character.escape" = cyan;
|
||||
|
|
@ -165,12 +165,8 @@
|
|||
"diff.plus" = green;
|
||||
"diff.delta" = yellow;
|
||||
"diff.minus" = red;
|
||||
"diagnostic" = {
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"ui.gutter" = {
|
||||
bg = black;
|
||||
};
|
||||
"diagnostic" = { modifiers = [ "underlined" ]; };
|
||||
"ui.gutter" = { bg = black; };
|
||||
"info" = blue;
|
||||
"hint" = dark-gray;
|
||||
"debug" = dark-gray;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue