菜鸟笔记
提升您的技术认知

vim对行进行排序-ag真人游戏

vim自带排序函数sort, 在命令行模式下执行:help sort 可查看其具体用法,摘录如下:

vim has a sorting function and a sorting command. the sorting function can be
found here: sort(), uniq().
:sor :sort
:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/]
sort lines in [range]. when no range is given all
lines are sorted.
with [!] the order is reversed.
with [i] case is ignored.
options [n][f][x][o][b] are mutually exclusive.

example: 忽略大小写,对文件所有行进行排序

:sort i

网站地图