Find and replace strings in vim on multiple lines

前端 未结 11 1800
耶瑟儿~
耶瑟儿~ 2020-12-02 03:29

I can do :%s///g for replacing a string across a file, or :s///

11条回答
  •  失恋的感觉
    2020-12-02 04:00

    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    /sys/sim/source/gm/kg/jl/ls/owow/lsal
    

    Suppose if you want to replace the above with some other info.

    COMMAND(:%s/\/sys\/sim\/source\/gm\/kg\/jl\/ls\/owow\/lsal/sys.pkg.mpu.umc.kdk./g)

    In this the above will be get replaced with (sys.pkg.mpu.umc.kdk.) .

提交回复
热议问题