在 VIM 中的行尾插入 [英] Inserting at the end of a line in VIM

查看:43
本文介绍了在 VIM 中的行尾插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以很长一段时间以来,我都有一个坏习惯,即到行尾,按 i 键,然后按向右箭头插入最后一个字符之后.然而,这是非常低效的,而且用 hjkl 是不可能做到的.

So for a long time I've had a bad habit of going to the end of a line, hitting the i key and then hitting the right arrow to insert after that last character. However, this is extremely inefficient and impossible to do with hjkl.

在行尾插入的更好方法是什么?

What's a better way to insert at the VERY end of the line?

推荐答案

使用 A 命令代替 i.该命令在行尾追加文本.参见:help A.

Use A command instead of i. The command appends text at the end of the line. See :help A.

在正常模式下按 A(大写).Vim 将切换到插入模式,光标将移动到当前行的末尾准备输入.

In normal mode press A (uppercase). Vim will be switched to insert mode, and the cursor will be moved to the end of the current line ready for input.

这篇关于在 VIM 中的行尾插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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