转到第 n 个符号 [英] Go to n-th symbol in line

查看:21
本文介绍了转到第 n 个符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Vim 中将光标移动到左起第 n 个符号?

How to move cursor to the n-th symbol from the left in Vim?

我看到的解决方案之一是按 0n,它会移动到 n+1 位置.有没有更自然的方法呢?

One of the solutions I see is press 0n<right-arrow>, it will move to the n+1 position. Is there any more natural way to do it?

推荐答案

管道'|'字符可能就是你想要的:

The pipe '|' character may be what you want:

要在普通模式下转到一行的第 25 列,请按 25|

To go to 25th column in a line in normal mode press 25|

要在普通模式下转到一行中的第 37 列,请按 37|

To go to 37th column in a line in normal mode press 37|

等等...

这篇关于转到第 n 个符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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