如何在 Vim 中不切换插入模式的情况下转到括号/方括号/引号的末尾? [英] How can I go to end of parenthesis/brackets/quotes without switching insert mode in Vim?

查看:13
本文介绍了如何在 Vim 中不切换插入模式的情况下转到括号/方括号/引号的末尾?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个插件,当你在里面时,它可以让你摆脱括号/括号/引号/等.我发现在插入模式下必须 ESC 到命令模式并键入 A 以退出括号以转到行尾有点困难,是否有满足我需求的插件?

I'm looking for a plugin that makes you get out of parenthesis/brackets/quotes/etc when you're inside them. I find it kind of hard having to ESC to command mode and typing A to get out of the parenthesis to go to the end of the line in Insert mode, is there a plugin that meets my needs?

推荐答案

一个插件是多余的.将此映射添加到您的 ~/.vimrc:

A plugin would be overkill. Add this mapping to your ~/.vimrc:

inoremap <C-e> <C-o>A

  • 用于在不离开 insert 模式的情况下发出 normal 模式命令.
  • A,好吧……你知道它是做什么的.
    • <C-o> is used to issue a normal mode command without leaving insert mode.
    • A, well… you know what it does.
    • 这篇关于如何在 Vim 中不切换插入模式的情况下转到括号/方括号/引号的末尾?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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