使用命令将单词对齐到 vim 中的指定列 [英] Allign the words to the specified column in vim using commands
本文介绍了使用命令将单词对齐到 vim 中的指定列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将整个文件中的单词移动或移动到指定的列?例如像下面这样:之前:
How I can move or shift the words in the entire file to the specified column? For example like below: Before :
123 ABC
112 XYZS
15925 asdf
1111 25asd
1 qwer
之后:
123 ABC
112 XYZS
15925 asdf
1111 25asd
1 qwer
如何使用命令模式完成?这里的事情是我们需要将第二个单词移到指定的列这里指定的列是 8
How it can be done using command mode? Here the thing is we need to shift the 2nd word to the specified column Here the specified column is 8
推荐答案
除了其他人提到的 vim-plugins,如果你正在使用 column
命令的 linux box,你可以:
except for vim-plugins mentioned by others, if you were working on a linux box with column
command available, you could just :
%!column -t
%
可以是 vim 范围,例如视觉选择等.
%
could be vim ranges, e.g. visual selections etc..
这篇关于使用命令将单词对齐到 vim 中的指定列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文