kakoune: use different cursor color in insert mode
This commit is contained in:
parent
c4c900a48a
commit
846c58788e
2 changed files with 17 additions and 1 deletions
|
|
@ -14,6 +14,9 @@ let
|
|||
orange = color.normal.orange;
|
||||
brown = color.normal.brown;
|
||||
};
|
||||
|
||||
cursorNormalSpec = "${colors.accent_fg},${colors.accent_color}+fg";
|
||||
cursorInsertSpec = "black,bright-green+b";
|
||||
in
|
||||
with colors;
|
||||
''
|
||||
|
|
@ -49,8 +52,11 @@ with colors;
|
|||
# builtin faces
|
||||
face global Default default,default
|
||||
|
||||
face global PrimaryCursor ${accent_fg},${accent_color}+fg
|
||||
face global PrimaryCursor ${cursorNormalSpec}
|
||||
face global PrimaryCursorEol PrimaryCursor
|
||||
|
||||
declare-option str cursor_normal_face '${cursorNormalSpec}'
|
||||
declare-option str cursor_insert_face '${cursorInsertSpec}'
|
||||
face global PrimarySelection default,${bg_light}+f
|
||||
|
||||
face global SecondaryCursor default,default+rfg
|
||||
|
|
|
|||
|
|
@ -2,6 +2,16 @@ set global idle_timeout 500
|
|||
|
||||
enable-auto-pairs
|
||||
|
||||
hook -group tell-mode global ModeChange push:.*:insert %{
|
||||
set-face window PrimaryCursor %opt{cursor_insert_face}
|
||||
set-face window PrimaryCursorEol %opt{cursor_insert_face}
|
||||
}
|
||||
|
||||
hook -group tell-mode global ModeChange pop:insert:.* %{
|
||||
set-face window PrimaryCursor %opt{cursor_normal_face}
|
||||
set-face window PrimaryCursorEol %opt{cursor_normal_face}
|
||||
}
|
||||
|
||||
hook global NormalIdle .* %{ evaluate-commands %sh{
|
||||
hex_with_size() {
|
||||
for i in 3 4 6 8; do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue