* visualize evil insert mode
@ 2018-07-04 6:44 emacs-list-18
2018-07-04 13:04 ` Óscar Fuentes
2018-07-04 13:14 ` Bingo
0 siblings, 2 replies; 4+ messages in thread
From: emacs-list-18 @ 2018-07-04 6:44 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
i am searching for ideas how to visualize that evil mode is in insert
state.
Till now i use a funvtion that is hooked into the post-command-hook
that moves an overlay (face bold) like this:
(defun ck/evil/move-insert-mode-overlay()
"move the insert mode overlay"
(move-overlay ck/insert-mode-overlay (line-beginning-position)
(line-end-position))
)
This works, but is not that nice. For example on an empty line, i dont
have any visual feedback.
Any other ideas for this? No, hl-line-mode does not count... ;-)
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: visualize evil insert mode
2018-07-04 6:44 visualize evil insert mode emacs-list-18
@ 2018-07-04 13:04 ` Óscar Fuentes
2018-07-05 6:30 ` emacs-list-18
2018-07-04 13:14 ` Bingo
1 sibling, 1 reply; 4+ messages in thread
From: Óscar Fuentes @ 2018-07-04 13:04 UTC (permalink / raw)
To: help-gnu-emacs
emacs-list-18@pgxml.net writes:
> i am searching for ideas how to visualize that evil mode is in insert
> state.
>
> Till now i use a funvtion that is hooked into the post-command-hook
> that moves an overlay (face bold) like this:
>
> (defun ck/evil/move-insert-mode-overlay()
> "move the insert mode overlay"
> (move-overlay ck/insert-mode-overlay (line-beginning-position)
> (line-end-position))
> )
>
> This works, but is not that nice. For example on an empty line, i dont
> have any visual feedback.
>
> Any other ideas for this? No, hl-line-mode does not count... ;-)
It depends on what you mean when you say "visualize".
I use
(setq evil-insert-state-cursor '("red" hbar))
(setq evil-insert-state-tag
(propertize "<I>" 'face '((:foreground "white" :background "red"))))
Similar for the other modes.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: visualize evil insert mode
2018-07-04 13:04 ` Óscar Fuentes
@ 2018-07-05 6:30 ` emacs-list-18
0 siblings, 0 replies; 4+ messages in thread
From: emacs-list-18 @ 2018-07-05 6:30 UTC (permalink / raw)
To: help-gnu-emacs
Óscar Fuentes <ofv@wanadoo.es> writes:
> emacs-list-18@pgxml.net writes:
>
>> i am searching for ideas how to visualize that evil mode is in insert
>> state.
[...]
> Any other ideas for this? No, hl-line-mode does not count... ;-)
>
> It depends on what you mean when you say "visualize".
>
> I use
>
> (setq evil-insert-state-cursor '("red" hbar))
> (setq evil-insert-state-tag
> (propertize "<I>" 'face '((:foreground "white" :background "red"))))
>
> Similar for the other modes.
Thank you, i did not know that! :-)
To be a bit more precise...
- shows the current line where the cursor is (works halfway)
- shows the current line even if it is empty (i am experimenting with
overlays here)
- works on terminals with less than 256 colors.
Chris
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: visualize evil insert mode
2018-07-04 6:44 visualize evil insert mode emacs-list-18
2018-07-04 13:04 ` Óscar Fuentes
@ 2018-07-04 13:14 ` Bingo
1 sibling, 0 replies; 4+ messages in thread
From: Bingo @ 2018-07-04 13:14 UTC (permalink / raw)
To: help-gnu-emacs
Le 4 juillet 2018 12:14:08 GMT+05:30, emacs-list-18@pgxml.net a écrit :
>Hi,
>
> i am searching for ideas how to visualize that evil mode is in insert
> state.
>
> Till now i use a funvtion that is hooked into the post-command-hook
> that moves an overlay (face bold) like this:
>
>(defun ck/evil/move-insert-mode-overlay()
> "move the insert mode overlay"
> (move-overlay ck/insert-mode-overlay (line-beginning-position)
> (line-end-position))
> )
>
> This works, but is not that nice. For example on an empty line, i dont
> have any visual feedback.
>
>Any other ideas for this? No, hl-line-mode does not count... ;-)
>
>Chris
I find it easier to change the color of mode-line according to evil state : https://www.emacswiki.org/emacs/Evil#toc18
It is always in peripheral vision, so once I got used to it, I never lacked the evil state awareness.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-05 6:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-04 6:44 visualize evil insert mode emacs-list-18
2018-07-04 13:04 ` Óscar Fuentes
2018-07-05 6:30 ` emacs-list-18
2018-07-04 13:14 ` Bingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).