Skip to content

Latest commit

 

History

History
73 lines (63 loc) · 1.15 KB

文本排序.md

File metadata and controls

73 lines (63 loc) · 1.15 KB

neovim-practise-101-文本排序

Origin text

word,tree,bear,moon
lamp,rain,hair,fire
book,door,song,fish
ship,star,sand,time
bell,corn,team,road
cake,duck,read,boat
lion,desk,walk,play
hand,kiss,rock,salt
baby,jump,zone,mind
bird,dust,game,spin
frog,foot,idea,open
home,seed,wind,snow

以升序排列所有的行后

baby,jump,zone,mind
bell,corn,team,road
bird,dust,game,spin
book,door,song,fish
cake,duck,read,boat
frog,foot,idea,open
hand,kiss,rock,salt
home,seed,wind,snow
lamp,rain,hair,fire
lion,desk,walk,play
ship,star,sand,time
word,tree,bear,moon

以倒序排列所有的行后

word,tree,bear,moon
ship,star,sand,time
lion,desk,walk,play
lamp,rain,hair,fire
home,seed,wind,snow
hand,kiss,rock,salt
frog,foot,idea,open
cake,duck,read,boat
book,door,song,fish
bird,dust,game,spin
bell,corn,team,road
baby,jump,zone,mind

以第二列为 key 进行升序排列后

bell,corn,team,road
lion,desk,walk,play
book,door,song,fish
cake,duck,read,boat
bird,dust,game,spin
frog,foot,idea,open
baby,jump,zone,mind
hand,kiss,rock,salt
lamp,rain,hair,fire
home,seed,wind,snow
ship,star,sand,time
word,tree,bear,moon

Answer

TODO