在插入一些缓冲区时启动邪恶模式 [英] Start evil mode in insert for some buffers

查看:192
本文介绍了在插入一些缓冲区时启动邪恶模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



例如,在只读缓冲区中,没有一个正常模式因为我然后不能使用q退出,但我必须做我q。这对于产生错误缓冲区的交互式模式很烦人。



我一直在尝试和失败的是如下:

 ($($)$($)$($)$($)$($)$($)

解决方案>

您可以修改变量 evil-insert-state-modes ,其中包含应该以插入状态开始的模式列表:

 (add-to-list'evil-insert-state-modes'视图模式)
pre>

emacs状态,正常状态等都有类似的变量。


I would like to set some buffers to be opened in insert mode in evil.

For example in read-only buffers there is no point in having a normal mode since i then can't use q to exit but i have to do i q. This is annoying for interactive modes that produce error buffers.

What I have been trying and failed with is as follows:

(evil-set-initial-state view-mode 'insert)

解决方案

You can modify the variable evil-insert-state-modes, which holds a list of modes that should be started in insert state:

(add-to-list 'evil-insert-state-modes 'view-mode)

There are analogous variables for emacs state, normal state, etc.

这篇关于在插入一些缓冲区时启动邪恶模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆