How to flip the lines of a visual selection in vim?

后端 未结 4 1222
一生所求
一生所求 2021-02-18 18:38

I want to take a visual selection and flip it so that the first line of the selection is on the bottom. From:


The
wheels
go
round.


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-02-18 19:03

    Further to Dave Kirby's answer and addressing the "how to do this simply" requirement, you could create a shortcut in your .vimrc file. The following example maps the F5 key to this shortcut:

    map :'<,'>!tail -r

    or for OS X:

    map :'<,'>!tac

提交回复
热议问题