How to convert all text to lowercase in Vim

前端 未结 10 1798
刺人心
刺人心 2021-01-29 18:21

How do you convert all text in Vim to lowercase? Is it even possible?

10条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-29 18:29

    I assume you want lowercase the text. Solution is pretty simple:

    ggVGu
    

    Explanation:

    1. gg - goes to first line of text
    2. V - turns on Visual selection, in line mode
    3. G - goes to end of file (at the moment you have whole text selected)
    4. u - lowercase selected area

提交回复
热议问题