将输入键映射到 vim 中的换行符和制表符 [英] mapping enter key to newline and tab in vim

查看:43
本文介绍了将输入键映射到 vim 中的换行符和制表符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我按回车键,表示段落结束,vim 应该自动插入另一个新行,并在下一个插入一个制表符线.所有这些都是为了表示我已经准备好输入下一段了.

Whenever I press the enter key, indicating an end of paragraph, vim should automatically insert another new line, and insert a tab space in the next line. All this is to denote that I am ready to type the next paragraph.

推荐答案

我同意评论说这不是一个好主意,但以下对我有用:

I agree with the comments saying that this is not a good idea to do, but the following works for me:

inoremap <buffer> <cr> <cr><cr><tab>

这篇关于将输入键映射到 vim 中的换行符和制表符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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