如何在 vi 或 vim 中多次缩进一行? [英] How do I indent a single line multiple times in vi or vim?

查看:26
本文介绍了如何在 vi 或 vim 中多次缩进一行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了几个关于如何在 vim 中缩进多行的答案,我想知道如何取一行并多次缩进.实际上,我想要以下命令的较短版本:>>>>>>>>>>>>(即 10 个右括号大于"符号.)

I've found several answers on how to indent multiple lines in vim, I want to know how to take a single line and indent it more than once. In effect, I want a shorter version of the following command: ">>>>>>>>>>" (That is 10 right bracket "greater-than" signs.)

推荐答案

选择你想要的(通常用 vShift+v) 然后输入 5>.

Select what you want (typically with v or Shift+v) then type 5>.

如果您需要修复或重复相同的选择,请使用 gv.

If you need to fix or repeat the same selection, use gv.

这篇关于如何在 vi 或 vim 中多次缩进一行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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