本文介绍了更改多行中一列中的所有字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不确定如何解释我想做的事情,但是我已经在Textmate中看到了这一点,它非常有用.假设我有这段文字:
I'm not sure how to explain what I'd like to do, but I've seen this in Textmate and it was quite useful. Let's say I have this text:
:aa => foo,
:ab => foo,
:ac => foo,
:ad => foo
现在,我想选择键的所有首字符(lne中的4个"a")并将其删除,以便结果如下所示:
Now I want to select all first characters of the keys (the 4 'a' in the lne) and remove them, so that the result looks like this:
:a => foo,
:b => foo,
:c => foo,
:d => foo
某种可视模式下的统计列而不是行.
Some kind of visual mode accounting columns not lines.
推荐答案
在列模式下使用vim.要使用它,请按:
Use vim in column mode. To use it, press:
- + 进入列模式.
- 选择要在其中输入文本的列和行.
- + 进入列模式的插入模式.
-
键入您要输入的文本.
- + to go into column mode.
- Select the columns and rows where you want to enter your text.
- + to go into insert mode in column mode.
Type in the text you want to enter.
您现在将看到已应用更改.
You will now see your changed applied.
来源: VI中的列编辑模式
这篇关于更改多行中一列中的所有字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!