替换

:%s/abc/123/g 把abc全部替换成123

:%s/abc/123/gc 同上,但需要用户一个个的确认替换

选中区块替换

v模式下选中块  :  会看到

:'<,'>

然后补全

:'<,'>s/aaa/bbb/g


TAB替换为空格: 
:set ts=4
:set expandtab
:%retab!

 

空格替换为TAB:
:set ts=4
:set noexpandtab
:%retab!

相关文章:

  • 2021-07-29
  • 2021-05-23
  • 2021-07-10
  • 2021-06-26
  • 2022-01-15
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-01
  • 2022-12-23
  • 2022-01-28
  • 2022-12-23
相关资源
相似解决方案