From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.help Subject: Re: visualize evil insert mode Date: Wed, 04 Jul 2018 15:04:20 +0200 Message-ID: <87in5v884r.fsf@telefonica.net> References: <87k1qb8pqf.fsf@radagast.pgxml.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1530709396 26073 195.159.176.226 (4 Jul 2018 13:03:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Jul 2018 13:03:16 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 04 15:03:12 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fahRA-0006eC-9g for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2018 15:03:12 +0200 Original-Received: from localhost ([::1]:47047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fahTH-0000Yw-E3 for geh-help-gnu-emacs@m.gmane.org; Wed, 04 Jul 2018 09:05:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fahSS-0000XL-W9 for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 09:04:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fahSS-0001AE-84 for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 09:04:32 -0400 Original-Received: from [195.159.176.226] (port=42330 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fahSS-00018I-0p for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 09:04:32 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fahQE-0005KB-Kc for help-gnu-emacs@gnu.org; Wed, 04 Jul 2018 15:02:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:BstLmlRZnsOurytjVK/ntppDcoc= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117342 Archived-At: 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 "" 'face '((:foreground "white" :background "red")))) Similar for the other modes.