以下配置在远程不起作用:
(setq evil-visual-state-cursor 'hbar)
(setq evil-normal-state-cursor 'box)
(setq evil-insert-state-cursor 'bar)
(setq evil-emacs-state-cursor 'box)
没有了光标指示,经常忘记当前在什么状态,要纠正一连串的输入错误,是件痛苦的事。
难道只有修改 mode-line
前/背景色一条路了?
以下配置在远程不起作用:
(setq evil-visual-state-cursor 'hbar)
(setq evil-normal-state-cursor 'box)
(setq evil-insert-state-cursor 'bar)
(setq evil-emacs-state-cursor 'box)
没有了光标指示,经常忘记当前在什么状态,要纠正一连串的输入错误,是件痛苦的事。
难道只有修改 mode-line
前/背景色一条路了?
最后决定修改 hl-line
的背景色(终端只支持 265 色,要选个合适颜色不太容易):
(set-face-background 'region "#ffffaf")
(add-hook 'evil-insert-state-entry-hook (lambda () (set-face-background 'hl-line "#121212")))
(add-hook 'evil-normal-state-entry-hook (lambda () (set-face-background 'hl-line "#4e4e4e")))
region 的背景色跟当前 color-theme 有点不搭,但这个是非常态(主要为了避免混淆,color-theme 有自己的 region 设置,它有可能跟我设置的 hl-line 背景色相近),所以还过得去。其实也可以考虑修改,linum 样式,稍麻烦一点。
normal
insert
visual
可以参考 https://github.com/CodeFalling/wiki/wiki/Mode-line 的方案只改变 evil 在 mode-line 上的 tag 的颜色,这样颜色不会冲突(个人感觉也算是显眼)
修改 `linum` 的效果:
normal
insert
这种做法挺有意思的