Vim multiline editing like in sublimetext?

后端 未结 7 1086
借酒劲吻你
借酒劲吻你 2021-01-29 17:15

I started to use gvim, and I can\'t quite understand how the multiline edit works in gvim.

For example:

Original text:

asd asd asd asd asd;
asd a         


        
7条回答
  •  温柔的废话
    2021-01-29 18:00

    if you use the "global" command, you can repeat what you can do on one online an any number of lines.

    :g//.
    

    example:

    :g/foo/.s/bar/baz/g
    

    The above command finds all lines that have foo, and replace all occurrences of bar on that line with baz.

    :g/.*/
    

    will do on every line

提交回复
热议问题