在“VI"编辑器中对行进行排序 [英] sort rows in 'VI' editor
本文介绍了在“VI"编辑器中对行进行排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我必须根据="左侧的值对以下行进行排序.但是排序应该同时将选择扩展到 '=' 之后的列.Thtz 是我们不必在 '=' ::
If i have to sort following rows on the basis of values on left of '='. But the sorting should expand the selection to column after '=' simultaneously. Thtz is we dnt have to sort column after '=' ::
50599=1000000
50454=00000054
50080=00005464
50098=00000875
50661=00000665
50788=10000035
50988=10000006
50994=10000656
57009=00000005
57022=10000008
57040=10000005
57000=10000005
57060=10000089
57067=10005640
57102=00000765
57190=00000867
这需要在VI"编辑文件中完成.
This needs to be done in 'VI' editing the file.
结果应该是 ::
50080=00005464
50098=00000875 ...etc.
推荐答案
这个答案晚了 2 年,但可能仍然相关,在可视模式下选择要排序和运行的块:
This answer is coming 2 years late, but might still be relevant, in visual mode select the block you want to sort and run:
:!sort
这篇关于在“VI"编辑器中对行进行排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文