移到Vi中行字符的末尾,超过行中的最后一个字符 [英] Move to the end of line character in Vi, past the last character in the line

查看:386
本文介绍了移到Vi中行字符的末尾,超过行中的最后一个字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Vi中,当我按下$时,它将转到行中的最后一个字符而不是行字符的末尾?我如何在一次击键中转到行字符的结尾,什么是删除行字符结尾的最快方法?

How come in Vi, when I hit $, it goes to the last character in the line instead of the end of the line character? How would I go to the end of the line character in one keystroke, and what is the fastest way to delete the end of the line character?

推荐答案

在Vi中,当我按下$时,它将转到行中的最后一个字符而不是行字符的末尾吗?

How come in Vi, when I hit $, it goes to the last character in the line instead of the end of the line character?

因为这足以满足您可能想要实现的所有目标.

Because that’s sufficient for anything you might want to achieve.

我如何在一次击键中转到行字符的末尾

How would I go to the end of the line character in one keystroke

您基本上不需要.您只需要在下一步中执行不同的操作即可,具体取决于要通过换行符实现的功能.例如:

You basically never need to. You just do different things in the next step depending on what you wanted to achieve by going to the newline character. Eg.:

删除行尾字符最快的方法是什么?

what is the fastest way to delete the end of the line character?

只需在行中按J即可 j . (如果启用了autoindent或朋友,则甚至会为您删除联接行中的缩进.)如果您不希望刚获得多余的空格字符,请继续使用x.或使用gJ开始.

Just hit J to join the lines. (If you have autoindent or friends enabled, that will even take care of removing indentation from the joined line for you.) Follow up with an x if you didn’t want the extra space character you just got; or use gJ to begin with, instead.

这篇关于移到Vi中行字符的末尾,超过行中的最后一个字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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