如何在 Vim 中移动到行尾? [英] How do I move to end of line in Vim?

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

问题描述

我知道一般如何在命令模式下移动,特别是跳转到行等.但是跳转到我当前所在行尾的命令是什么?

I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on?

推荐答案

只需 $ (美元符号) 键.您可以使用 A 移动到行尾并切换到编辑模式(Append).要跳转最后一个非空白字符,您可以按 g 然后按 _ 键.

Just the $ (dollar sign) key. You can use A to move to the end of the line and switch to editing mode (Append). To jump the last non-blank character, you can press g then _ keys.

A 的反面是 I(行首插入模式),顺便说一句.仅按 ^ 会将光标置于该行的第一个非空白字符处.

The opposite of A is I (Insert mode at beginning of line), as an aside. Pressing just the ^ will place your cursor at the first non-white-space character of the line.

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

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